Skip to content

Commit

Permalink
fix: adds subnet_ids as an output (#299)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Crespo <[email protected]>
  • Loading branch information
samcre and Samuel Crespo authored Jun 1, 2021
1 parent 354fcb1 commit fe89ce6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Then perform the following commands on the root folder:
| route\_names | The route names associated with this VPC |
| 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. |
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
| subnets\_ids | The IDs of the subnets being created |
| subnets\_ips | The IPs and CIDRs of the subnets being created |
| subnets\_names | The names of the subnets being created |
| subnets\_private\_access | Whether the subnets will have access to Google API's without a public IP |
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ output "subnets_names" {
description = "The names of the subnets being created"
}

output "subnets_ids" {
value = [for network in module.subnets.subnets : network.id]
description = "The IDs of the subnets being created"
}

output "subnets_ips" {
value = [for network in module.subnets.subnets : network.ip_cidr_range]
description = "The IPs and CIDRs of the subnets being created"
Expand Down

0 comments on commit fe89ce6

Please sign in to comment.