Skip to content

Commit 90caad5

Browse files
authored
Specified a variable's contents
Specified that the security group needs to be addressed by it's id and not by its name. This will assist when debugging the error with message "{name} is invalid. Expect fully qualified resource Id that start with azure .properties.networkSecurityGroup.id"
1 parent fecc218 commit 90caad5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

website/source/docs/providers/azurerm/r/virtual_network.html.markdown

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ resource "azurerm_virtual_network" "test" {
3434
subnet {
3535
name = "subnet3"
3636
address_prefix = "10.0.3.0/24"
37+
security_group = "${azurerm_network_security_group.test.id}"
3738
}
3839
3940
tags {
@@ -73,7 +74,7 @@ The `subnet` block supports:
7374
* `address_prefix` - (Required) The address prefix to use for the subnet.
7475

7576
* `security_group` - (Optional) The Network Security Group to associate with
76-
the subnet.
77+
the subnet. (Referenced by `id`, ie. `azurerm_network_security_group.test.id`)
7778

7879
## Attributes Reference
7980

@@ -88,4 +89,4 @@ Virtual Networks can be imported using the `resource id`, e.g.
8889

8990
```
9091
terraform import azurerm_virtual_network.testNetwork /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1
91-
```
92+
```

0 commit comments

Comments
 (0)