layout | page_title | sidebar_current | description |
---|---|---|---|
libvirt |
Libvirt: libvirt_cloudinit |
docs-libvirt-cloudinit |
Manages a cloud-init ISO to attach to a domain |
Manages a cloud-init ISO disk that can be used to customize a domain during first boot.
resource "libvirt_cloudinit" "commoninit" {
name = "commoninit.iso"
local_hostname = "node"
}
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, thedefault
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 theroot
user.user_data
- (Optional) Raw cloud-init user data. This content will be merged automatically with the values specified in other arguments (likelocal_hostname
,ssh_authorized_key
, etc). The contents ofuser_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.