Skip to content

Commit 0cdf0d6

Browse files
authored
Merge pull request #27 from pratikmallya/master
Add subnet_self_links as outputs
2 parents 732b54a + d2dcd97 commit 0cdf0d6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "vpc" {
4444
4545
subnet-02 = []
4646
}
47-
47+
4848
routes = [
4949
{
5050
name = "egress-internet"
@@ -105,7 +105,7 @@ The routes list contains maps, where each object represents a route. For the nex
105105
| name | The name of the route being created | string | - | no |
106106
| description | The description of the route being created | string | - | no |
107107
| tags | The network tags assigned to this route. This is a list in string format. Eg. "tag-01,tag-02"| string | - | yes |
108-
| destination_range | The destination range of outgoing packets that this route applies to. Only IPv4 is supported | string | - | yes
108+
| destination_range | The destination range of outgoing packets that this route applies to. Only IPv4 is supported | string | - | yes
109109
| next_hop_internet | Whether the next hop to this route will the default internet gateway. Use "true" to enable this as next hop | string | - | yes |
110110
| next_hop_ip | Network IP address of an instance that should handle matching packets | string | - | yes |
111111
| next_hop_instance | URL or name of an instance that should handle matching packets. If just name is specified "next_hop_instance_zone" is required | string | - | yes |
@@ -120,6 +120,7 @@ The routes list contains maps, where each object represents a route. For the nex
120120
| network_name | The name of the VPC being created |
121121
| network_self_link | The URI of the VPC being created |
122122
| subnets_ips | The IPs and CIDRs of the subnets being created |
123+
| subnets_self_links | The `self_link`s of the subnets being created |
123124
| subnets_names | The names of the subnets being created |
124125
| subnets_private_access | Whether the subnets will have access to Google API's without a public IP |
125126
| subnets_flow_logs | Whether the subnets will have VPC flow logs enabled |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ output "subnets_ips" {
3434
description = "The IPs and CIDRs of the subnets being created"
3535
}
3636

37+
output "subnets_self_links" {
38+
value = "${google_compute_subnetwork.subnetwork.*.self_link}"
39+
description = "The self-links of subnets being created"
40+
}
41+
3742
output "subnets_regions" {
3843
value = "${google_compute_subnetwork.subnetwork.*.region}"
3944
description = "The region where the subnets will be created"

0 commit comments

Comments
 (0)