diff --git a/modules/net-address/README.md b/modules/net-address/README.md index 02eb6458e3..a8a467f6b0 100644 --- a/modules/net-address/README.md +++ b/modules/net-address/README.md @@ -143,13 +143,13 @@ module "addresses" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [project_id](variables.tf#L83) | Project where the addresses will be created. | string | ✓ | | -| [external_addresses](variables.tf#L17) | Map of external addresses, keyed by name. | map(object({…})) | | {} | -| [global_addresses](variables.tf#L38) | List of global addresses to create. | map(object({…})) | | {} | -| [internal_addresses](variables.tf#L48) | Map of internal addresses to create, keyed by name. | map(object({…})) | | {} | -| [ipsec_interconnect_addresses](variables.tf#L64) | Map of internal addresses used for HPA VPN over Cloud Interconnect. | map(object({…})) | | {} | -| [psa_addresses](variables.tf#L88) | Map of internal addresses used for Private Service Access. | map(object({…})) | | {} | -| [psc_addresses](variables.tf#L101) | Map of internal addresses used for Private Service Connect. | map(object({…})) | | {} | +| [project_id](variables.tf#L84) | Project where the addresses will be created. | string | ✓ | | +| [external_addresses](variables.tf#L17) | Map of external addresses, keyed by name. | map(object({…})) | | {} | +| [global_addresses](variables.tf#L39) | List of global addresses to create. | map(object({…})) | | {} | +| [internal_addresses](variables.tf#L49) | Map of internal addresses to create, keyed by name. | map(object({…})) | | {} | +| [ipsec_interconnect_addresses](variables.tf#L65) | Map of internal addresses used for HPA VPN over Cloud Interconnect. | map(object({…})) | | {} | +| [psa_addresses](variables.tf#L89) | Map of internal addresses used for Private Service Access. | map(object({…})) | | {} | +| [psc_addresses](variables.tf#L102) | Map of internal addresses used for Private Service Connect. | map(object({…})) | | {} | ## Outputs diff --git a/modules/net-address/main.tf b/modules/net-address/main.tf index 9f9d52303a..a822f388b9 100644 --- a/modules/net-address/main.tf +++ b/modules/net-address/main.tf @@ -31,6 +31,7 @@ resource "google_compute_address" "external" { address_type = "EXTERNAL" ip_version = each.value.ipv6 != null ? "IPV6" : "IPV4" ipv6_endpoint_type = try(each.value.ipv6.endpoint_type, null) + network_tier = each.value.tier region = each.value.region labels = each.value.labels } diff --git a/modules/net-address/variables.tf b/modules/net-address/variables.tf index 5a6fd683b1..b0dbe58006 100644 --- a/modules/net-address/variables.tf +++ b/modules/net-address/variables.tf @@ -24,6 +24,7 @@ variable "external_addresses" { })) labels = optional(map(string), {}) name = optional(string) + tier = optional(string) })) default = {} validation { diff --git a/modules/net-lb-app-ext-regional/README.md b/modules/net-lb-app-ext-regional/README.md index 7d77ca52f2..4c2a8aa6dc 100644 --- a/modules/net-lb-app-ext-regional/README.md +++ b/modules/net-lb-app-ext-regional/README.md @@ -157,8 +157,11 @@ Redirect is implemented via an additional HTTP load balancer with a custom URL m module "addresses" { source = "./fabric/modules/net-address" project_id = var.project_id - global_addresses = { - "ralb-test-0" = {} + external_addresses = { + "ralb-test-0" = { + region = var.region + tier = "STANDARD" + } } } @@ -169,7 +172,7 @@ module "ralb-test-0-redirect" { vpc = var.vpc.self_link region = var.region address = ( - module.addresses.global_addresses["ralb-test-0"].address + module.addresses.external_addresses["ralb-test-0"].id ) health_check_configs = {} urlmap_config = { @@ -188,7 +191,7 @@ module "ralb-test-0" { vpc = var.vpc.self_link region = var.region address = ( - module.addresses.global_addresses["ralb-test-0"].address + module.addresses.external_addresses["ralb-test-0"].id ) backend_service_configs = { default = { @@ -745,6 +748,6 @@ module "ralb-0" { ## Fixtures -- [compute-mig-bc.tf](../../tests/fixtures/compute-vm-group-bc.tf) +- [compute-vm-group-bc.tf](../../tests/fixtures/compute-vm-group-bc.tf) - [ssl-certificate.tf](../../tests/fixtures/ssl-certificate.tf)