From 7acb4966b2c673a036072f98813b9267e870a8db Mon Sep 17 00:00:00 2001 From: John Inama Date: Tue, 5 Sep 2023 17:23:45 -0400 Subject: [PATCH 01/18] Added optional name value to instances variable and added it to the instance resource --- modules/apigee/README.md | 6 +++--- modules/apigee/main.tf | 2 +- modules/apigee/variables.tf | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/apigee/README.md b/modules/apigee/README.md index 5a8eb52517..378604b464 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -180,13 +180,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [project_id](variables.tf#L95) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L96) | Project ID. | string | ✓ | | | [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | | [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | | [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | | [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L80) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | +| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L81) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ## Outputs diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 4a2e3d25e2..c5c0918a19 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -86,7 +86,7 @@ resource "google_apigee_environment_iam_binding" "binding" { resource "google_apigee_instance" "instances" { for_each = var.instances - name = "instance-${each.key}" + name = coalesce(each.value.name, "instance-${each.key}") display_name = each.value.display_name description = each.value.description location = each.key diff --git a/modules/apigee/variables.tf b/modules/apigee/variables.tf index c5832e33f7..b7fc149542 100644 --- a/modules/apigee/variables.tf +++ b/modules/apigee/variables.tf @@ -66,6 +66,7 @@ variable "instances" { description = "Instances ([REGION] => [INSTANCE])." type = map(object({ display_name = optional(string) + name = optional(string) description = optional(string, "Terraform-managed") runtime_ip_cidr_range = string troubleshooting_ip_cidr_range = string From 46be7c0c1d6c90e7a14a63dde1435aacaa49629f Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 13:25:58 -0400 Subject: [PATCH 02/18] Added original attachment loop block as local for backwards compatibility --- modules/apigee/main.tf | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index c5c0918a19..5e961658ea 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -17,6 +17,20 @@ locals { org_id = try(google_apigee_organization.organization[0].id, "organizations/${var.project_id}") org_name = try(google_apigee_organization.organization[0].name, var.project_id) + instance_environment_list = merge(concat([for k1, v1 in local.instances : { + for v2 in v1.environments : + "${k1}-${v2}" => { + environment = v2 + region = k1 + } + }])...) + environment_region_list = merge(concat([for k1, v1 in var.environments : { + for v2 in coalesce(v1.regions, []) : + "${k1}-${v2}" => { + environment = k1 + region = v2 + } + }])...) } resource "google_apigee_organization" "organization" { @@ -107,13 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = merge(concat([for k1, v1 in var.environments : { - for v2 in coalesce(v1.regions, []) : - "${k1}-${v2}" => { - environment = k1 - region = v2 - } - }])...) + for_each = coalesce(local.environment_region_list, local.instance_environment_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 401c3478ea2dc2ccfcd58664561ffb6b9d452529 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 13:48:38 -0400 Subject: [PATCH 03/18] Fixed copy/paste error from earlier commit --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 5e961658ea..680e85f9a0 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -17,7 +17,7 @@ locals { org_id = try(google_apigee_organization.organization[0].id, "organizations/${var.project_id}") org_name = try(google_apigee_organization.organization[0].name, var.project_id) - instance_environment_list = merge(concat([for k1, v1 in local.instances : { + instance_environment_list = merge(concat([for k1, v1 in var.instances : { for v2 in v1.environments : "${k1}-${v2}" => { environment = v2 From 7ceaf9b513783826ad08f494de60cb96ffa050b4 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 13:58:41 -0400 Subject: [PATCH 04/18] Added environments back to instances variable --- modules/apigee/README.md | 6 +++--- modules/apigee/variables.tf | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/apigee/README.md b/modules/apigee/README.md index 378604b464..67daa729c3 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -180,13 +180,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [project_id](variables.tf#L96) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L97) | Project ID. | string | ✓ | | | [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | | [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | | [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | | [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L81) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | +| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L82) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ## Outputs diff --git a/modules/apigee/variables.tf b/modules/apigee/variables.tf index b7fc149542..45cba50f50 100644 --- a/modules/apigee/variables.tf +++ b/modules/apigee/variables.tf @@ -72,6 +72,7 @@ variable "instances" { troubleshooting_ip_cidr_range = string disk_encryption_key = optional(string) consumer_accept_list = optional(list(string)) + environments = optional(list(string)) enable_nat = optional(bool, false) })) default = {} From c32e2763f0cf90f9468dd5d8701e422303cf587a Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 14:30:43 -0400 Subject: [PATCH 05/18] Changed instance loop to a coalescelist function --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 680e85f9a0..ec6947b7ee 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = coalesce(local.environment_region_list, local.instance_environment_list) + for_each = coalescelist(local.environment_region_list, local.instance_environment_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From c1c99a0a792b7e389e7671bcd7540ee558d06fba Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 14:54:30 -0400 Subject: [PATCH 06/18] back to coalesce --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index ec6947b7ee..680e85f9a0 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = coalescelist(local.environment_region_list, local.instance_environment_list) + for_each = coalesce(local.environment_region_list, local.instance_environment_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From e64cd90d4c677c873082b9b55bcc64d4461b312a Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 15:29:25 -0400 Subject: [PATCH 07/18] just trying the old way first --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 680e85f9a0..b1f99839f5 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = coalesce(local.environment_region_list, local.instance_environment_list) + for_each = local.instance_environment_list instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From b4979fd451b05806aa59f6fa870e95d716d72901 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 16:59:30 -0400 Subject: [PATCH 08/18] Added coalesce to local variable and to the attachment resource --- modules/apigee/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index b1f99839f5..85d0f175f8 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -18,7 +18,7 @@ locals { org_id = try(google_apigee_organization.organization[0].id, "organizations/${var.project_id}") org_name = try(google_apigee_organization.organization[0].name, var.project_id) instance_environment_list = merge(concat([for k1, v1 in var.instances : { - for v2 in v1.environments : + for v2 in coalesce(v1.environments, []) : "${k1}-${v2}" => { environment = v2 region = k1 @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = local.instance_environment_list + for_each = coalesce(local.instance_environment_list, local.environment_region_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 35ff529b9cee2360e0219cef85d12430457abf05 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 17:02:04 -0400 Subject: [PATCH 09/18] swapping coalesce variables for test --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 85d0f175f8..60f661fed9 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = coalesce(local.instance_environment_list, local.environment_region_list) + for_each = coalesce(local.environment_region_list, local.instance_environment_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 822dfc01100dd9b1922732f9e5f7be4c8c230d47 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 17:08:39 -0400 Subject: [PATCH 10/18] replaced coalesce with merge --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 60f661fed9..e24665b2e7 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = coalesce(local.environment_region_list, local.instance_environment_list) + for_each = merge(local.environment_region_list, local.instance_environment_list...) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 3941129a683901c047d7e21719b42a3a38003868 Mon Sep 17 00:00:00 2001 From: John Inama Date: Wed, 6 Sep 2023 17:12:31 -0400 Subject: [PATCH 11/18] still testing --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index e24665b2e7..c62dac320e 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = merge(local.environment_region_list, local.instance_environment_list...) + for_each = merge(local.environment_region_list, local.instance_environment_list) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 3e069ea16a7c2c4097ba2aeb8c896aafc47d5547 Mon Sep 17 00:00:00 2001 From: John Inama Date: Thu, 7 Sep 2023 08:26:40 -0400 Subject: [PATCH 12/18] changed from merge to length-based if statement --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index c62dac320e..f12a5351a8 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -121,7 +121,7 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = merge(local.environment_region_list, local.instance_environment_list) + for_each = length(local.environment_region_list) == 0 ? local.instance_environment_list : local.environment_region_list instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From b285deca962d1b2f926655595a85faa1ab439558 Mon Sep 17 00:00:00 2001 From: John Inama Date: Fri, 15 Sep 2023 16:48:13 -0400 Subject: [PATCH 13/18] Putting it back how it was and flipping the attachment name --- modules/apigee/main.tf | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index f12a5351a8..84c121dbe3 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -17,20 +17,6 @@ locals { org_id = try(google_apigee_organization.organization[0].id, "organizations/${var.project_id}") org_name = try(google_apigee_organization.organization[0].name, var.project_id) - instance_environment_list = merge(concat([for k1, v1 in var.instances : { - for v2 in coalesce(v1.environments, []) : - "${k1}-${v2}" => { - environment = v2 - region = k1 - } - }])...) - environment_region_list = merge(concat([for k1, v1 in var.environments : { - for v2 in coalesce(v1.regions, []) : - "${k1}-${v2}" => { - environment = k1 - region = v2 - } - }])...) } resource "google_apigee_organization" "organization" { @@ -121,7 +107,13 @@ resource "google_apigee_nat_address" "apigee_nat" { } resource "google_apigee_instance_attachment" "instance_attachments" { - for_each = length(local.environment_region_list) == 0 ? local.instance_environment_list : local.environment_region_list + for_each = merge(concat([for k1, v1 in var.instances : { + for v2 in coalesce(v1.environments, []) : + "${k1}-${v2}" => { + instance = k1 + environment = v2 + } + }])...) instance_id = google_apigee_instance.instances[each.value.region].id environment = try(google_apigee_environment.environments[each.value.environment].name, "${local.org_id}/environments/${each.value.environment}") From 39264f5edd76ad0db1b95c61440121606b98af89 Mon Sep 17 00:00:00 2001 From: John Inama Date: Fri, 15 Sep 2023 16:59:13 -0400 Subject: [PATCH 14/18] I think it's all back --- modules/apigee/variables.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/apigee/variables.tf b/modules/apigee/variables.tf index 45cba50f50..db09c28c3b 100644 --- a/modules/apigee/variables.tf +++ b/modules/apigee/variables.tf @@ -56,7 +56,6 @@ variable "environments" { })) iam = optional(map(list(string))) envgroups = optional(list(string)) - regions = optional(list(string)) })) default = {} nullable = false From 8469c86e63c0c0aaba055438e9f8c5b35cd63b9d Mon Sep 17 00:00:00 2001 From: John Inama Date: Mon, 18 Sep 2023 13:02:09 -0400 Subject: [PATCH 15/18] reversing instance attachment names --- modules/apigee/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index cd1f71975a..4557527dd0 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -114,7 +114,7 @@ resource "google_apigee_nat_address" "apigee_nat" { resource "google_apigee_instance_attachment" "instance_attachments" { for_each = merge(concat([for k1, v1 in var.instances : { for v2 in coalesce(v1.environments, []) : - "${v2}-${k1}" => { + "${k1}-${v2}" => { instance = k1 environment = v2 } From 27a15260a83027ccb904b25264d23cf623c73c8b Mon Sep 17 00:00:00 2001 From: John Inama Date: Mon, 18 Sep 2023 13:08:26 -0400 Subject: [PATCH 16/18] updating docs --- modules/apigee/README.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/modules/apigee/README.md b/modules/apigee/README.md index cb99a34a70..906ce95a5c 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -316,23 +316,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -<<<<<<< HEAD -| [project_id](variables.tf#L97) | Project ID. | string | ✓ | | -| [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | -| [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | -| [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | -| [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L82) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | -======= -| [project_id](variables.tf#L117) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L119) | Project ID. | string | ✓ | | | [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | | [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | | [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | | [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L89) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ->>>>>>> master +| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L91) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ## Outputs From b9a8b534e458014f17cab67416fa9da5f1aaba29 Mon Sep 17 00:00:00 2001 From: John Inama Date: Mon, 18 Sep 2023 13:08:26 -0400 Subject: [PATCH 17/18] updating docs --- modules/apigee/README.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/modules/apigee/README.md b/modules/apigee/README.md index cb99a34a70..906ce95a5c 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -316,23 +316,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -<<<<<<< HEAD -| [project_id](variables.tf#L97) | Project ID. | string | ✓ | | -| [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | -| [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | -| [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | -| [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L65) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L82) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | -======= -| [project_id](variables.tf#L117) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L119) | Project ID. | string | ✓ | | | [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | | [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | | [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | | [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L89) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ->>>>>>> master +| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L91) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ## Outputs From c4c851c1dc6e9f12d3382d8f5d27de85d1eff51b Mon Sep 17 00:00:00 2001 From: Ludo Date: Wed, 20 Sep 2023 10:53:44 +0200 Subject: [PATCH 18/18] remove duplicate variable members --- modules/apigee/README.md | 6 +++--- modules/apigee/variables.tf | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/apigee/README.md b/modules/apigee/README.md index 906ce95a5c..7692d6f4b0 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -316,13 +316,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [project_id](variables.tf#L119) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L117) | Project ID. | string | ✓ | | | [addons_config](variables.tf#L17) | Addons configuration. | object({…}) | | null | | [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | map(object({…})) | | {} | | [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | map(list(string)) | | {} | | [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | -| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L91) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | +| [instances](variables.tf#L64) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L89) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | ## Outputs diff --git a/modules/apigee/variables.tf b/modules/apigee/variables.tf index 3109956d1b..78549507e5 100644 --- a/modules/apigee/variables.tf +++ b/modules/apigee/variables.tf @@ -66,13 +66,11 @@ variable "instances" { type = map(object({ name = optional(string) display_name = optional(string) - name = optional(string) description = optional(string, "Terraform-managed") runtime_ip_cidr_range = optional(string) troubleshooting_ip_cidr_range = optional(string) disk_encryption_key = optional(string) consumer_accept_list = optional(list(string)) - environments = optional(list(string)) enable_nat = optional(bool, false) environments = optional(list(string)) }))