Skip to content

Commit d37bd44

Browse files
authored
feat: added new output subnet_detail_map which can be used as input with the terraform-base-ocp-vpc module (#427)
1 parent 6633f2b commit d37bd44

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ You need the following permissions to run this module.
130130
| <a name="output_network_acls"></a> [network\_acls](#output\_network\_acls) | List of shortnames and IDs of network ACLs |
131131
| <a name="output_public_gateways"></a> [public\_gateways](#output\_public\_gateways) | Map of public gateways by zone |
132132
| <a name="output_subnet_detail_list"></a> [subnet\_detail\_list](#output\_subnet\_detail\_list) | A list of subnets containing names, CIDR blocks, and zones. |
133+
| <a name="output_subnet_detail_map"></a> [subnet\_detail\_map](#output\_subnet\_detail\_map) | A map of subnets containing IDs, CIDR blocks, and zones |
133134
| <a name="output_subnet_ids"></a> [subnet\_ids](#output\_subnet\_ids) | The IDs of the subnets |
134135
| <a name="output_subnet_zone_list"></a> [subnet\_zone\_list](#output\_subnet\_zone\_list) | A list containing subnet IDs and subnet zones |
135136
| <a name="output_vpc_crn"></a> [vpc\_crn](#output\_vpc\_crn) | CRN of VPC created |

module-metadata.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
"description": "List of shortnames and IDs of network ACLs",
401401
"pos": {
402402
"filename": "outputs.tf",
403-
"line": 87
403+
"line": 91
404404
}
405405
},
406406
"public_gateways": {
@@ -419,6 +419,14 @@
419419
"line": 52
420420
}
421421
},
422+
"subnet_detail_map": {
423+
"name": "subnet_detail_map",
424+
"description": "A map of subnets containing IDs, CIDR blocks, and zones",
425+
"pos": {
426+
"filename": "outputs.tf",
427+
"line": 81
428+
}
429+
},
422430
"subnet_ids": {
423431
"name": "subnet_ids",
424432
"description": "The IDs of the subnets",
@@ -451,7 +459,7 @@
451459
"description": "Details of VPC flow logs collector",
452460
"pos": {
453461
"filename": "outputs.tf",
454-
"line": 104
462+
"line": 108
455463
}
456464
},
457465
"vpc_id": {

outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ output "subnet_zone_list" {
7878
]
7979
}
8080

81+
output "subnet_detail_map" {
82+
description = "A map of subnets containing IDs, CIDR blocks, and zones"
83+
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 }]])
84+
}
8185
##############################################################################
8286

8387
##############################################################################

0 commit comments

Comments
 (0)