provider/openstack: Add documentation about user_data (#14411)

This commit is contained in:
Joe Topjian 2017-05-12 06:36:01 -04:00 committed by Paul Stack
parent 5c39f5b2d2
commit a27e142625
1 changed files with 20 additions and 0 deletions

View File

@ -259,6 +259,26 @@ resource "openstack_compute_instance_v2" "multi-eph" {
}
```
### Instance with User Data (cloud-init)
```hcl
resource "openstack_compute_instance_v2" "instance_1" {
name = "basic"
image_id = "ad091b52-742f-469e-8f3c-fd81cadf0743"
flavor_id = "3"
key_pair = "my_key_pair_name"
security_groups = ["default"]
user_data = "#cloud-config\nhostname: instance_1.example.com\nfqdn: instance_1.example.com"
network {
name = "my_network"
}
}
```
`user_data` can come from a variety of sources: inline, read in from the `file`
function, or the `template_cloudinit_config` resource.
## Argument Reference
The following arguments are supported: