add support for custom description in net-address (#1499)
This commit is contained in:
parent
0b224a7f55
commit
973a8594b6
|
@ -83,12 +83,12 @@ module "addresses" {
|
|||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L54) | Project where the addresses will be created. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L55) | Project where the addresses will be created. | <code>string</code> | ✓ | |
|
||||
| [external_addresses](variables.tf#L17) | Map of external address regions, keyed by name. | <code>map(string)</code> | | <code>{}</code> |
|
||||
| [global_addresses](variables.tf#L29) | List of global addresses to create. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [internal_addresses](variables.tf#L35) | Map of internal addresses to create, keyed by name. | <code title="map(object({ region = string subnetwork = string address = optional(string) labels = optional(map(string)) purpose = optional(string) tier = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psa_addresses](variables.tf#L59) | Map of internal addresses used for Private Service Access. | <code title="map(object({ address = string network = string prefix_length = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psc_addresses](variables.tf#L69) | Map of internal addresses used for Private Service Connect. | <code title="map(object({ address = string network = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [internal_addresses](variables.tf#L35) | 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.") labels = optional(map(string)) purpose = optional(string) tier = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psa_addresses](variables.tf#L60) | Map of internal addresses used for Private Service Access. | <code title="map(object({ address = string network = string description = optional(string, "Terraform managed.") prefix_length = number }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [psc_addresses](variables.tf#L71) | Map of internal addresses used for Private Service Connect. | <code title="map(object({ address = string network = string description = optional(string, "Terraform managed.") }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ resource "google_compute_address" "internal" {
|
|||
for_each = var.internal_addresses
|
||||
project = var.project_id
|
||||
name = each.key
|
||||
description = "Terraform managed."
|
||||
description = each.value.description
|
||||
address_type = "INTERNAL"
|
||||
region = each.value.region
|
||||
subnetwork = each.value.subnetwork
|
||||
|
@ -49,7 +49,7 @@ resource "google_compute_global_address" "psc" {
|
|||
for_each = var.psc_addresses
|
||||
project = var.project_id
|
||||
name = each.key
|
||||
description = "Terraform managed."
|
||||
description = each.value.description
|
||||
address = try(each.value.address, null)
|
||||
address_type = "INTERNAL"
|
||||
network = each.value.network
|
||||
|
@ -61,7 +61,7 @@ resource "google_compute_global_address" "psa" {
|
|||
for_each = var.psa_addresses
|
||||
project = var.project_id
|
||||
name = each.key
|
||||
description = "Terraform managed."
|
||||
description = each.value.description
|
||||
address = each.value.address
|
||||
address_type = "INTERNAL"
|
||||
network = each.value.network
|
||||
|
|
|
@ -35,12 +35,13 @@ variable "global_addresses" {
|
|||
variable "internal_addresses" {
|
||||
description = "Map of internal addresses to create, keyed by name."
|
||||
type = map(object({
|
||||
region = string
|
||||
subnetwork = string
|
||||
address = optional(string)
|
||||
labels = optional(map(string))
|
||||
purpose = optional(string)
|
||||
tier = optional(string)
|
||||
region = string
|
||||
subnetwork = string
|
||||
address = optional(string)
|
||||
description = optional(string, "Terraform managed.")
|
||||
labels = optional(map(string))
|
||||
purpose = optional(string)
|
||||
tier = optional(string)
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
@ -61,6 +62,7 @@ variable "psa_addresses" {
|
|||
type = map(object({
|
||||
address = string
|
||||
network = string
|
||||
description = optional(string, "Terraform managed.")
|
||||
prefix_length = number
|
||||
}))
|
||||
default = {}
|
||||
|
@ -69,8 +71,9 @@ variable "psa_addresses" {
|
|||
variable "psc_addresses" {
|
||||
description = "Map of internal addresses used for Private Service Connect."
|
||||
type = map(object({
|
||||
address = string
|
||||
network = string
|
||||
address = string
|
||||
network = string
|
||||
description = optional(string, "Terraform managed.")
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue