Skip to content

Commit c4d861e

Browse files
authored
Merge pull request #4 from data-platform-hq/add_map_output
fix: added name_to_id_map output
2 parents 89a9e61 + 2e1e44e commit c4d861e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ No modules.
4949
| <a name="output_id"></a> [id](#output\_id) | The ID of the subnet |
5050
| <a name="output_name"></a> [name](#output\_name) | The name of the subnet |
5151
| <a name="output_nsg_association_id"></a> [nsg\_association\_id](#output\_nsg\_association\_id) | The ID of the Network Security Group Association |
52+
| <a name="name_to_id_map"></a> [id](#output\_name\_to\_id\_map) | Map of Subnet Name to Id |
5253
<!-- END_TF_DOCS -->
5354

5455
## License

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ output "nsg_association_id" {
1717
value = var.nsg_id == "" ? "" : azurerm_subnet_network_security_group_association.this[0].id
1818
description = "The ID of the Network Security Group Association"
1919
}
20+
21+
output "name_to_id_map" {
22+
value = { (azurerm_subnet.this.name) = azurerm_subnet.this.id }
23+
description = "Map of Subnet Name to Id"
24+
}

0 commit comments

Comments
 (0)