mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/openstack: Add documentation about user_data (#14411)
This commit is contained in:
parent
5c39f5b2d2
commit
a27e142625
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user