From dd45498a3a4e8d7949ae1dbf871458a378cae521 Mon Sep 17 00:00:00 2001 From: Luca Prete Date: Mon, 5 Jun 2023 10:36:49 +0200 Subject: [PATCH] Remove hardcoded description from instance groups created under net-ilb --- modules/net-ilb/README.md | 22 +++++++++++----------- modules/net-ilb/groups.tf | 2 +- modules/net-ilb/variables.tf | 1 + 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/net-ilb/README.md b/modules/net-ilb/README.md index 38b7617f57..5f68d8ac55 100644 --- a/modules/net-ilb/README.md +++ b/modules/net-ilb/README.md @@ -180,22 +180,22 @@ module "ilb" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [name](variables.tf#L184) | Name used for all resources. | string | ✓ | | -| [project_id](variables.tf#L195) | Project id where resources will be created. | string | ✓ | | -| [region](variables.tf#L206) | GCP region. | string | ✓ | | -| [vpc_config](variables.tf#L217) | VPC-level configuration. | object({…}) | ✓ | | +| [name](variables.tf#L185) | Name used for all resources. | string | ✓ | | +| [project_id](variables.tf#L196) | Project id where resources will be created. | string | ✓ | | +| [region](variables.tf#L207) | GCP region. | string | ✓ | | +| [vpc_config](variables.tf#L218) | VPC-level configuration. | object({…}) | ✓ | | | [address](variables.tf#L17) | Optional IP address used for the forwarding rule. | string | | null | | [backend_service_config](variables.tf#L23) | Backend service level configuration. | object({…}) | | {} | | [backends](variables.tf#L56) | Load balancer backends, balancing mode is one of 'CONNECTION' or 'UTILIZATION'. | list(object({…})) | | [] | | [description](variables.tf#L75) | Optional description used for resources. | string | | "Terraform managed." | | [global_access](variables.tf#L81) | Global access, defaults to false if not set. | bool | | null | -| [group_configs](variables.tf#L87) | Optional unmanaged groups to create. Can be referenced in backends via outputs. | map(object({…})) | | {} | -| [health_check](variables.tf#L98) | Name of existing health check to use, disables auto-created health check. | string | | null | -| [health_check_config](variables.tf#L104) | Optional auto-created health check configuration, use the output self-link to set it in the auto healing policy. Refer to examples for usage. | object({…}) | | {…} | -| [labels](variables.tf#L178) | Labels set on resources. | map(string) | | {} | -| [ports](variables.tf#L189) | Comma-separated ports, leave null to use all ports. | list(string) | | null | -| [protocol](variables.tf#L200) | IP protocol used, defaults to TCP. | string | | "TCP" | -| [service_label](variables.tf#L211) | Optional prefix of the fully qualified forwarding rule name. | string | | null | +| [group_configs](variables.tf#L87) | Optional unmanaged groups to create. Can be referenced in backends via outputs. | map(object({…})) | | {} | +| [health_check](variables.tf#L99) | Name of existing health check to use, disables auto-created health check. | string | | null | +| [health_check_config](variables.tf#L105) | Optional auto-created health check configuration, use the output self-link to set it in the auto healing policy. Refer to examples for usage. | object({…}) | | {…} | +| [labels](variables.tf#L179) | Labels set on resources. | map(string) | | {} | +| [ports](variables.tf#L190) | Comma-separated ports, leave null to use all ports. | list(string) | | null | +| [protocol](variables.tf#L201) | IP protocol used, defaults to TCP. | string | | "TCP" | +| [service_label](variables.tf#L212) | Optional prefix of the fully qualified forwarding rule name. | string | | null | ## Outputs diff --git a/modules/net-ilb/groups.tf b/modules/net-ilb/groups.tf index fe8bf13d58..c2b7a237c5 100644 --- a/modules/net-ilb/groups.tf +++ b/modules/net-ilb/groups.tf @@ -21,7 +21,7 @@ resource "google_compute_instance_group" "unmanaged" { project = var.project_id zone = each.value.zone name = each.key - description = "Terraform-managed." + description = each.value.description instances = each.value.instances dynamic "named_port" { for_each = each.value.named_ports diff --git a/modules/net-ilb/variables.tf b/modules/net-ilb/variables.tf index d2ffc5a672..08c0f3b380 100644 --- a/modules/net-ilb/variables.tf +++ b/modules/net-ilb/variables.tf @@ -88,6 +88,7 @@ variable "group_configs" { description = "Optional unmanaged groups to create. Can be referenced in backends via outputs." type = map(object({ zone = string + description = optional(string, "Terraform managed.") instances = optional(list(string), []) named_ports = optional(map(number), {}) }))