Skip to content

Commit

Permalink
feat: added new output subnet_detail_map which can be used as input…
Browse files Browse the repository at this point in the history
… with the `terraform-base-ocp-vpc` module (terraform-ibm-modules#427)
  • Loading branch information
imprateeksh authored and gmendel committed Mar 29, 2023
1 parent 488af62 commit 60907fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ You need the following permissions to run this module.
| <a name="output_network_acls"></a> [network\_acls](#output\_network\_acls) | List of shortnames and IDs of network ACLs |
| <a name="output_public_gateways"></a> [public\_gateways](#output\_public\_gateways) | Map of public gateways by zone |
| <a name="output_subnet_detail_list"></a> [subnet\_detail\_list](#output\_subnet\_detail\_list) | A list of subnets containing names, CIDR blocks, and zones. |
| <a name="output_subnet_detail_map"></a> [subnet\_detail\_map](#output\_subnet\_detail\_map) | A map of subnets containing IDs, CIDR blocks, and zones |
| <a name="output_subnet_ids"></a> [subnet\_ids](#output\_subnet\_ids) | The IDs of the subnets |
| <a name="output_subnet_zone_list"></a> [subnet\_zone\_list](#output\_subnet\_zone\_list) | A list containing subnet IDs and subnet zones |
| <a name="output_vpc_crn"></a> [vpc\_crn](#output\_vpc\_crn) | CRN of VPC created |
Expand Down
12 changes: 10 additions & 2 deletions module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
"description": "List of shortnames and IDs of network ACLs",
"pos": {
"filename": "outputs.tf",
"line": 87
"line": 91
}
},
"public_gateways": {
Expand All @@ -419,6 +419,14 @@
"line": 52
}
},
"subnet_detail_map": {
"name": "subnet_detail_map",
"description": "A map of subnets containing IDs, CIDR blocks, and zones",
"pos": {
"filename": "outputs.tf",
"line": 81
}
},
"subnet_ids": {
"name": "subnet_ids",
"description": "The IDs of the subnets",
Expand Down Expand Up @@ -451,7 +459,7 @@
"description": "Details of VPC flow logs collector",
"pos": {
"filename": "outputs.tf",
"line": 104
"line": 108
}
},
"vpc_id": {
Expand Down
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ output "subnet_zone_list" {
]
}

output "subnet_detail_map" {
description = "A map of subnets containing IDs, CIDR blocks, and zones"
value = zipmap([for prefix, _ in var.address_prefixes : prefix], [for subnet in ibm_is_subnet.subnet : [{ id = subnet.id, zone = subnet.zone, cidr_block = subnet.ipv4_cidr_block }]])
}
##############################################################################

##############################################################################
Expand Down

0 comments on commit 60907fe

Please sign in to comment.