DNS zones added you Apigee module (#3149)
This commit is contained in:
@@ -17,6 +17,7 @@ This module simplifies the creation of a Apigee resources (organization, environ
|
||||
- [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)
|
||||
- [New DNS ZONE](#new-dns-zone)
|
||||
- [IAM](#iam)
|
||||
- [Recipes](#recipes)
|
||||
- [Variables](#variables)
|
||||
@@ -306,6 +307,24 @@ module "apigee" {
|
||||
# tftest modules=1 resources=1
|
||||
```
|
||||
|
||||
## New DNS ZONE
|
||||
|
||||
```
|
||||
module "apigee" {
|
||||
source = "./fabric/modules/apigee"
|
||||
project_id = "my-project"
|
||||
dns_zones = {
|
||||
test = {
|
||||
domain = "mydomain.com"
|
||||
description = "Zone for mydomain.com"
|
||||
target_project_id = "my-other-project"
|
||||
target_network_id = "projects/my-other-projects/global/networks/vpc"
|
||||
}
|
||||
}
|
||||
}
|
||||
# tftest modules=1 resources=1
|
||||
```
|
||||
|
||||
### IAM
|
||||
|
||||
```hcl
|
||||
@@ -364,13 +383,14 @@ module "apigee" {
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L132) | Project ID. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L144) | Project ID. | <code>string</code> | ✓ | |
|
||||
| [addons_config](variables.tf#L17) | Addons configuration. | <code title="object({ advanced_api_ops = optional(bool, false) api_security = optional(bool, false) connectors_platform = optional(bool, false) integration = optional(bool, false) monetization = optional(bool, false) })">object({…})</code> | | <code>null</code> |
|
||||
| [endpoint_attachments](variables.tf#L29) | Endpoint attachments. | <code title="map(object({ region = string service_attachment = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [envgroups](variables.tf#L39) | Environment groups (NAME => [HOSTNAMES]). | <code>map(list(string))</code> | | <code>{}</code> |
|
||||
| [environments](variables.tf#L46) | Environments. | <code title="map(object({ 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) })), {}) iam_bindings_additive = optional(map(object({ role = string member = string })), {}) node_config = optional(object({ min_node_count = optional(number) max_node_count = optional(number) })) type = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [instances](variables.tf#L74) | Instances ([REGION] => [INSTANCE]). | <code title="map(object({ consumer_accept_list = optional(list(string)) description = optional(string, "Terraform-managed") disk_encryption_key = optional(string) display_name = optional(string) enable_nat = optional(bool, false) activate_nat = optional(bool, false) environments = optional(list(string), []) name = optional(string) runtime_ip_cidr_range = optional(string) troubleshooting_ip_cidr_range = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [organization](variables.tf#L100) | Apigee organization. If set to null the organization must already exist. | <code title="object({ analytics_region = optional(string) api_consumer_data_encryption_key = optional(string) api_consumer_data_location = optional(string) authorized_network = optional(string) billing_type = optional(string) control_plane_encryption_key = optional(string) database_encryption_key = optional(string) description = optional(string, "Terraform-managed") disable_vpc_peering = optional(bool, false) display_name = optional(string) properties = optional(map(string), {}) runtime_type = optional(string, "CLOUD") retention = optional(string) })">object({…})</code> | | <code>null</code> |
|
||||
| [dns_zones](variables.tf#L29) | DNS zones. | <code title="map(object({ domain = string description = string target_project_id = string target_network_id = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [endpoint_attachments](variables.tf#L41) | Endpoint attachments. | <code title="map(object({ region = string service_attachment = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [envgroups](variables.tf#L51) | Environment groups (NAME => [HOSTNAMES]). | <code>map(list(string))</code> | | <code>{}</code> |
|
||||
| [environments](variables.tf#L58) | Environments. | <code title="map(object({ 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) })), {}) iam_bindings_additive = optional(map(object({ role = string member = string })), {}) node_config = optional(object({ min_node_count = optional(number) max_node_count = optional(number) })) type = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [instances](variables.tf#L86) | Instances ([REGION] => [INSTANCE]). | <code title="map(object({ consumer_accept_list = optional(list(string)) description = optional(string, "Terraform-managed") disk_encryption_key = optional(string) display_name = optional(string) enable_nat = optional(bool, false) activate_nat = optional(bool, false) environments = optional(list(string), []) name = optional(string) runtime_ip_cidr_range = optional(string) troubleshooting_ip_cidr_range = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [organization](variables.tf#L112) | Apigee organization. If set to null the organization must already exist. | <code title="object({ analytics_region = optional(string) api_consumer_data_encryption_key = optional(string) api_consumer_data_location = optional(string) authorized_network = optional(string) billing_type = optional(string) control_plane_encryption_key = optional(string) database_encryption_key = optional(string) description = optional(string, "Terraform-managed") disable_vpc_peering = optional(bool, false) display_name = optional(string) properties = optional(map(string), {}) runtime_type = optional(string, "CLOUD") retention = optional(string) })">object({…})</code> | | <code>null</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -173,3 +173,15 @@ resource "google_apigee_addons_config" "addons_config" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_apigee_dns_zone" "dns_zones" {
|
||||
for_each = var.dns_zones
|
||||
org_id = google_apigee_organization.organization[0].id
|
||||
dns_zone_id = each.key
|
||||
domain = each.value.domain
|
||||
description = each.value.description
|
||||
peering_config {
|
||||
target_project_id = each.value.target_project_id
|
||||
target_network_id = each.value.target_network_id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,18 @@ variable "addons_config" {
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "dns_zones" {
|
||||
description = "DNS zones."
|
||||
type = map(object({
|
||||
domain = string
|
||||
description = string
|
||||
target_project_id = string
|
||||
target_network_id = string
|
||||
}))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "endpoint_attachments" {
|
||||
description = "Endpoint attachments."
|
||||
type = map(object({
|
||||
|
||||
Reference in New Issue
Block a user