summaryrefslogtreecommitdiff
path: root/website/docs/r/cloudinit.html.markdown
blob: 5cd67fd1356dbebc4cc56b8ccbaee59c20e2df92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
layout: "libvirt"
page_title: "Libvirt: libvirt_cloudinit"
sidebar_current: "docs-libvirt-cloudinit"
description: |-
  Manages a cloud-init ISO to attach to a domain
---

# libvirt\_cloudinit

Manages a [cloud-init](http://cloudinit.readthedocs.io/) ISO disk that can be
used to customize a domain during first boot.

## Example Usage

```hcl
resource "libvirt_cloudinit" "commoninit" {
  name = "commoninit.iso"
  local_hostname = "node"
}

```

## Argument Reference

The following arguments are supported:

* `name` - (Required) A unique name for the resource, required by libvirt.
* `pool` - (Optional) The pool where the resource will be created.
  If not given, the `default` pool will be used.
* `local_hostname` - (Optional) If specified this is going to be the hostname of
  the domain.
* `ssh_authorized_key` - (Optional) A public ssh key that will be accepted by
  the `root` user.
* `user_data` - (Optional) Raw cloud-init user data. This content will
  be merged automatically with the values specified in other arguments
  (like `local_hostname`, `ssh_authorized_key`, etc). The contents of
  `user_data` will take precedence over the ones defined by the other keys.

Any change of the above fields will cause a new resource to be created.