Fix HTTP to HTTPS example
This commit is contained in:
parent
05dd4b89b6
commit
2a66fcab2e
|
@ -143,13 +143,13 @@ module "addresses" {
|
|||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L83) | Project where the addresses will be created. | <code>string</code> | ✓ | |
|
||||
| [external_addresses](variables.tf#L17) | Map of external addresses, keyed by name. | <code title="map(object({ region = string description = optional(string, "Terraform managed.") ipv6 = optional(object({ endpoint_type = string })) labels = optional(map(string), {}) name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [global_addresses](variables.tf#L38) | List of global addresses to create. | <code title="map(object({ description = optional(string, "Terraform managed.") ipv6 = optional(map(string)) # To be left empty for ipv6 name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [internal_addresses](variables.tf#L48) | Map of internal addresses to create, keyed by name. | <code title="map(object({ region = string subnetwork = string address = optional(string) description = optional(string, "Terraform managed.") ipv6 = optional(map(string)) # To be left empty for ipv6 labels = optional(map(string)) name = optional(string) purpose = optional(string) tier = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [ipsec_interconnect_addresses](variables.tf#L64) | Map of internal addresses used for HPA VPN over Cloud Interconnect. | <code title="map(object({ region = string address = string network = string description = optional(string, "Terraform managed.") name = optional(string) prefix_length = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psa_addresses](variables.tf#L88) | Map of internal addresses used for Private Service Access. | <code title="map(object({ address = string network = string prefix_length = number description = optional(string, "Terraform managed.") name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psc_addresses](variables.tf#L101) | Map of internal addresses used for Private Service Connect. | <code title="map(object({ address = string network = string description = optional(string, "Terraform managed.") name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [project_id](variables.tf#L84) | Project where the addresses will be created. | <code>string</code> | ✓ | |
|
||||
| [external_addresses](variables.tf#L17) | Map of external addresses, keyed by name. | <code title="map(object({ region = string description = optional(string, "Terraform managed.") ipv6 = optional(object({ endpoint_type = string })) labels = optional(map(string), {}) name = optional(string) tier = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [global_addresses](variables.tf#L39) | List of global addresses to create. | <code title="map(object({ description = optional(string, "Terraform managed.") ipv6 = optional(map(string)) # To be left empty for ipv6 name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [internal_addresses](variables.tf#L49) | Map of internal addresses to create, keyed by name. | <code title="map(object({ region = string subnetwork = string address = optional(string) description = optional(string, "Terraform managed.") ipv6 = optional(map(string)) # To be left empty for ipv6 labels = optional(map(string)) name = optional(string) purpose = optional(string) tier = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [ipsec_interconnect_addresses](variables.tf#L65) | Map of internal addresses used for HPA VPN over Cloud Interconnect. | <code title="map(object({ region = string address = string network = string description = optional(string, "Terraform managed.") name = optional(string) prefix_length = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psa_addresses](variables.tf#L89) | Map of internal addresses used for Private Service Access. | <code title="map(object({ address = string network = string prefix_length = number description = optional(string, "Terraform managed.") name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psc_addresses](variables.tf#L102) | Map of internal addresses used for Private Service Connect. | <code title="map(object({ address = string network = string description = optional(string, "Terraform managed.") name = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ variable "external_addresses" {
|
|||
}))
|
||||
labels = optional(map(string), {})
|
||||
name = optional(string)
|
||||
tier = optional(string)
|
||||
}))
|
||||
default = {}
|
||||
validation {
|
||||
|
|
|
@ -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)
|
||||
<!-- END TFDOC -->
|
||||
|
|
Loading…
Reference in New Issue