diff --git a/modules/apigee/README.md b/modules/apigee/README.md index ebae675f31..117d29c666 100644 --- a/modules/apigee/README.md +++ b/modules/apigee/README.md @@ -5,21 +5,22 @@ This module simplifies the creation of a Apigee resources (organization, environ ## Examples -- [Examples](#examples) - - [Minimal example (CLOUD)](#minimal-example-cloud) - - [Minimal example with existing organization (CLOUD)](#minimal-example-with-existing-organization-cloud) - - [Disable VPC Peering (CLOUD)](#disable-vpc-peering-cloud) - - [All resources (CLOUD)](#all-resources-cloud) - - [All resources (HYBRID control plane)](#all-resources-hybrid-control-plane) - - [New environment group](#new-environment-group) - - [New environment](#new-environment) - - [New instance (VPC Peering Provisioning Mode)](#new-instance-vpc-peering-provisioning-mode) - - [New instance (Non VPC Peering Provisioning Mode)](#new-instance-non-vpc-peering-provisioning-mode) - - [New endpoint attachment](#new-endpoint-attachment) - - [Apigee add-ons](#apigee-add-ons) - - [IAM](#iam) -- [Variables](#variables) -- [Outputs](#outputs) +- [Apigee](#apigee) + - [Examples](#examples) + - [Minimal example (CLOUD)](#minimal-example-cloud) + - [Minimal example with existing organization (CLOUD)](#minimal-example-with-existing-organization-cloud) + - [Disable VPC Peering (CLOUD)](#disable-vpc-peering-cloud) + - [All resources (CLOUD)](#all-resources-cloud) + - [All resources (HYBRID control plane)](#all-resources-hybrid-control-plane) + - [New environment group](#new-environment-group) + - [New environment](#new-environment) + - [New instance (VPC Peering Provisioning Mode)](#new-instance-vpc-peering-provisioning-mode) + - [New instance (Non VPC Peering Provisioning Mode)](#new-instance-non-vpc-peering-provisioning-mode) + - [New endpoint attachment](#new-endpoint-attachment) + - [Apigee add-ons](#apigee-add-ons) + - [IAM](#iam) + - [Variables](#variables) + - [Outputs](#outputs) ### Minimal example (CLOUD) @@ -359,13 +360,13 @@ module "apigee" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [project_id](variables.tf#L130) | Project ID. | string | ✓ | | +| [project_id](variables.tf#L131) | 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#L73) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | -| [organization](variables.tf#L98) | Apigee organization. If set to null the organization must already exist. | object({…}) | | null | +| [environments](variables.tf#L46) | Environments. | map(object({…})) | | {} | +| [instances](variables.tf#L74) | Instances ([REGION] => [INSTANCE]). | map(object({…})) | | {} | +| [organization](variables.tf#L99) | 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 afbc1e5af6..480d19feb5 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -54,12 +54,13 @@ resource "google_apigee_envgroup" "envgroups" { } resource "google_apigee_environment" "environments" { - for_each = var.environments - api_proxy_type = each.value.api_proxy_type - deployment_type = each.value.deployment_type - description = each.value.description - display_name = each.value.display_name - name = each.key + for_each = var.environments + api_proxy_type = each.value.api_proxy_type + deployment_type = each.value.deployment_type + description = each.value.description + display_name = each.value.display_name + forward_proxy_uri = each.value.forward_proxy_uri + name = each.key dynamic "node_config" { for_each = try(each.value.node_config, null) != null ? [""] : [] content { diff --git a/modules/apigee/variables.tf b/modules/apigee/variables.tf index 6ce9fdcf1f..e8d1ffb664 100644 --- a/modules/apigee/variables.tf +++ b/modules/apigee/variables.tf @@ -46,12 +46,13 @@ variable "envgroups" { variable "environments" { description = "Environments." type = map(object({ - api_proxy_type = optional(string) - description = optional(string, "Terraform-managed") - display_name = optional(string) - deployment_type = optional(string) - envgroups = optional(list(string), []) - iam = optional(map(list(string)), {}) + api_proxy_type = optional(string) + description = optional(string, "Terraform-managed") + display_name = optional(string) + deployment_type = optional(string) + envgroups = optional(list(string), []) + forward_proxy_uri = optional(string) + iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ role = string members = list(string)