diff --git a/README.md b/README.md index e23ecde..57eb0e5 100644 --- a/README.md +++ b/README.md @@ -111,9 +111,12 @@ No modules. | Name | Description | |------|-------------| +| [firewall\_id](#output\_firewall\_id) | an identifier for the resource with format projects/{{project}}/global/firewalls/{{name}} | | [gateway\_ipv4](#output\_gateway\_ipv4) | The gateway address for default routing out of the network. This value is selected by GCP. | | [id](#output\_id) | an identifier for the resource with format projects/{{project}}/global/networks/{{name}} | +| [nat\_id](#output\_nat\_id) | an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{router\_name}}/nat | | [numeric\_id](#output\_numeric\_id) | The unique identifier for the resource. This identifier is defined by the server. | +| [router\_id](#output\_router\_id) | an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{name}} | | [self\_link](#output\_self\_link) | The URI of the created resource. | | [subnet\_ids](#output\_subnet\_ids) | n/a | \ No newline at end of file diff --git a/example/sample/outputs.tf b/example/sample/outputs.tf index e69de29..c4646b8 100644 --- a/example/sample/outputs.tf +++ b/example/sample/outputs.tf @@ -0,0 +1,9 @@ +output "subnet_ids" { + description = "description" + value = module.vpc.subnet_ids +} + +output "firewall_id" { + description = "description" + value = module.vpc.firewall_id +} diff --git a/outputs.tf b/outputs.tf index d1138c4..87974f4 100644 --- a/outputs.tf +++ b/outputs.tf @@ -30,3 +30,21 @@ output "subnet_ids" { } } } + +### Firewall Outputs ### +output "firewall_id" { + description = "an identifier for the resource with format projects/{{project}}/global/firewalls/{{name}}" + value = try(values(google_compute_firewall.this)[*].id, []) +} + +### Router Outputs ### +output "router_id" { + description = "an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{name}}" + value = try(google_compute_router.this[0].id, null) +} + +### NAT Outputs ### +output "nat_id" { + description = "an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{router_name}}/nat" + value = try(google_compute_router_nat.this[0].id, null) +} \ No newline at end of file diff --git a/route-nat.tf b/router-nat.tf similarity index 100% rename from route-nat.tf rename to router-nat.tf