0
0
llucycodes42
The code uses the resource "openstack_compute_instance_v2" to create an instance. The instance uses the name "my-instance", and has the description "my-description-${myResourceName}" set. The instance's image is "ad091b52-742f-469e-8f3c-fd81cadf0743" and it uses the flavor "3". Lastly, the instance has a key pair and security groups set.
Shortcut: tf_openstack_compute_instance_v2
resource "openstack_compute_instance_v2" "${myResourceName}" {
name = "my-${myResourceName}"
description = "my-description-${myResourceName}"
image_id = "ad091b52-742f-469e-8f3c-fd81cadf0743"
flavor_id = "3"
key_pair = "my_key_pair_name"
security_groups = ["default"]
metadata {
this = "that"
}
network {
name = "my_network"
}
}