From e3e05540debc9bc765599dc01010a5b890bf0073 Mon Sep 17 00:00:00 2001 From: Keith Harvey Date: Thu, 29 Jun 2023 09:45:29 +0100 Subject: [PATCH] change var name, drop default, update docs --- .../data-platform-minimal/02-composer.tf | 2 +- .../data-solutions/data-platform-minimal/README.md | 14 +++++++------- .../data-platform-minimal/variables.tf | 11 +---------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/blueprints/data-solutions/data-platform-minimal/02-composer.tf b/blueprints/data-solutions/data-platform-minimal/02-composer.tf index f4360226..a890064b 100644 --- a/blueprints/data-solutions/data-platform-minimal/02-composer.tf +++ b/blueprints/data-solutions/data-platform-minimal/02-composer.tf @@ -111,7 +111,7 @@ resource "google_composer_environment" "processing-cmp-0" { } web_server_network_access_control { dynamic "allowed_ip_range" { - for_each = var.composer_config.web_server_network_access_ip_ranges + for_each = var.composer_config.web_server_access_control content { value = allowed_ip_range.value["value"] description = allowed_ip_range.value["description"] diff --git a/blueprints/data-solutions/data-platform-minimal/README.md b/blueprints/data-solutions/data-platform-minimal/README.md index e459c37f..f6ac475c 100644 --- a/blueprints/data-solutions/data-platform-minimal/README.md +++ b/blueprints/data-solutions/data-platform-minimal/README.md @@ -280,13 +280,13 @@ The application layer is out of scope of this script. As a demo purpuse only, on | [organization_domain](variables.tf#L119) | Organization domain. | string | ✓ | | | [prefix](variables.tf#L124) | Prefix used for resource names. | string | ✓ | | | [project_config](variables.tf#L133) | Provide 'billing_account_id' value if project creation is needed, uses existing 'project_ids' if null. Parent is in 'folders/nnn' or 'organizations/nnn' format. | object({…}) | ✓ | | -| [composer_config](variables.tf#L17) | Cloud Composer config. | object({…}) | | {} | -| [data_catalog_tags](variables.tf#L54) | List of Data Catalog Policy tags to be created with optional IAM binging configuration in {tag => {ROLE => [MEMBERS]}} format. | map(map(list(string))) | | {…} | -| [data_force_destroy](variables.tf#L65) | Flag to set 'force_destroy' on data services like BiguQery or Cloud Storage. | bool | | false | -| [enable_services](variables.tf#L71) | Flag to enable or disable services in the Data Platform. | object({…}) | | {} | -| [groups](variables.tf#L80) | User groups. | map(string) | | {…} | -| [location](variables.tf#L90) | Location used for multi-regional resources. | string | | "eu" | -| [network_config](variables.tf#L96) | Shared VPC network configurations to use. If null networks will be created in projects. | object({…}) | | {} | +| [composer_config](variables.tf#L17) | Cloud Composer config. | object({…}) | | {} | +| [data_catalog_tags](variables.tf#L55) | List of Data Catalog Policy tags to be created with optional IAM binging configuration in {tag => {ROLE => [MEMBERS]}} format. | map(map(list(string))) | | {…} | +| [data_force_destroy](variables.tf#L66) | Flag to set 'force_destroy' on data services like BiguQery or Cloud Storage. | bool | | false | +| [enable_services](variables.tf#L72) | Flag to enable or disable services in the Data Platform. | object({…}) | | {} | +| [groups](variables.tf#L81) | User groups. | map(string) | | {…} | +| [location](variables.tf#L91) | Location used for multi-regional resources. | string | | "eu" | +| [network_config](variables.tf#L97) | Shared VPC network configurations to use. If null networks will be created in projects. | object({…}) | | {} | | [project_suffix](variables.tf#L157) | Suffix used only for project ids. | string | | null | | [region](variables.tf#L163) | Region used for regional resources. | string | | "europe-west1" | | [service_encryption_keys](variables.tf#L169) | Cloud KMS to use to encrypt different services. Key location should match service region. | object({…}) | | {} | diff --git a/blueprints/data-solutions/data-platform-minimal/variables.tf b/blueprints/data-solutions/data-platform-minimal/variables.tf index 40692b76..afe57383 100644 --- a/blueprints/data-solutions/data-platform-minimal/variables.tf +++ b/blueprints/data-solutions/data-platform-minimal/variables.tf @@ -24,16 +24,7 @@ variable "composer_config" { env_variables = optional(map(string), {}) image_version = optional(string, "composer-2-airflow-2") }), {}) - web_server_network_access_ip_ranges = optional(list(map(string)), [ - { - description = "Allows access from all IPv4 addresses (default value)" - value = "0.0.0.0/0" - }, - { - description = "Allows access from all IPv6 addresses (default value)" - value = "::0/0" - } - ]) + web_server_access_control = optional(map(string)) workloads_config = optional(object({ scheduler = optional(object({ cpu = optional(number, 0.5)