-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Azure-Terraform/subnet_features
Subnet features
- Loading branch information
Showing
11 changed files
with
63 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
output "vnet" { | ||
description = "Virtual network resource" | ||
description = "Virtual network data object" | ||
value = azurerm_virtual_network.vnet | ||
} | ||
|
||
output "subnet" { | ||
description = "Map of subnet resources" | ||
description = "Map of subnet data objects" | ||
value = zipmap( | ||
[for subnet in azurerm_subnet.subnet: subnet.name], | ||
[for subnet in azurerm_subnet.subnet: subnet] | ||
[for subnet in module.subnet: subnet.name], | ||
[for subnet in module.subnet: subnet.subnet] | ||
) | ||
} | ||
|
||
output "subnet_nsg_ids" { | ||
description = "Map of subnet ids to associated network_security_group ids" | ||
value = zipmap( | ||
[for subnet in azurerm_subnet.subnet: subnet.id], | ||
[for nsg in azurerm_network_security_group.nsg: nsg.id] | ||
[for subnet in module.subnet: subnet.id], | ||
[for subnet in module.subnet: subnet.nsg_id] | ||
) | ||
} | ||
|
||
output "subnet_nsg_names" { | ||
description = "Map of subnet names to associated network_security_group names" | ||
value = zipmap( | ||
[for subnet in azurerm_subnet.subnet: subnet.name], | ||
[for nsg in azurerm_network_security_group.nsg: nsg.name] | ||
[for subnet in module.subnet: subnet.name], | ||
[for subnet in module.subnet: subnet.nsg_name] | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
data "http" "naming_rules" { | ||
url = var.naming_conventions_yaml_url | ||
|
||
request_headers = { | ||
Accept = "application/yaml" | ||
} | ||
} | ||
|
||
locals { | ||
naming_rules = yamldecode(data.http.naming_rules.body) | ||
naming_rules = yamldecode(var.naming_rules) | ||
subnet_types = local.naming_rules.subnetType.allowed_values | ||
|
||
valid_subnet_type = (contains(keys(local.subnet_types), var.subnet_type) ? null : file("ERROR: invalid input value for reserved subnet type")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters