Merge pull request #4356 from lowescott/issue-4319

provider/openstack: Add section on referencing security groups by name
pull/4283/merge
Joe Topjian 11 years ago
commit ef0b870425

@ -99,3 +99,17 @@ rule {
```
A list of ICMP types and codes can be found [here](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Control_messages).
### Referencing Security Groups
When referencing a security group in a configuration (for example, a configuration creates a new security group and then needs to apply it to an instance being created in the same configuration), it is currently recommended to reference the security group by name and not by ID, like this:
```
resource "openstack_compute_instance_v2" "test-server" {
name = "tf-test"
image_id = "ad091b52-742f-469e-8f3c-fd81cadf0743"
flavor_id = "3"
key_pair = "my_key_pair_name"
security_groups = ["${openstack_compute_secgroup_v2.secgroup_1.name}"]
}
```

Loading…
Cancel
Save