Skip to content

Commit fe89ce6

Browse files
samcreSamuel Crespo
andauthored
fix: adds subnet_ids as an output (#299)
Co-authored-by: Samuel Crespo <[email protected]>
1 parent 354fcb1 commit fe89ce6

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
@@ -118,6 +118,7 @@ Then perform the following commands on the root folder:
118118
| route\_names | The route names associated with this VPC |
119119
| subnets | A map with keys of form subnet\_region/subnet\_name and values being the outputs of the google\_compute\_subnetwork resources used to create corresponding subnets. |
120120
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
121+
| subnets\_ids | The IDs of the subnets being created |
121122
| subnets\_ips | The IPs and CIDRs of the subnets being created |
122123
| subnets\_names | The names of the subnets being created |
123124
| subnets\_private\_access | Whether the subnets will have access to Google API's without a public IP |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ output "subnets_names" {
4444
description = "The names of the subnets being created"
4545
}
4646

47+
output "subnets_ids" {
48+
value = [for network in module.subnets.subnets : network.id]
49+
description = "The IDs of the subnets being created"
50+
}
51+
4752
output "subnets_ips" {
4853
value = [for network in module.subnets.subnets : network.ip_cidr_range]
4954
description = "The IPs and CIDRs of the subnets being created"

0 commit comments

Comments
 (0)