diff --git a/blueprints/data-solutions/composer-2/README.md b/blueprints/data-solutions/composer-2/README.md index 511dde045d..51e49bd300 100644 --- a/blueprints/data-solutions/composer-2/README.md +++ b/blueprints/data-solutions/composer-2/README.md @@ -113,14 +113,14 @@ service_encryption_keys = { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [prefix](variables.tf#L87) | Prefix used for resource names. | string | ✓ | | -| [project_id](variables.tf#L105) | Project id, references existing project if `project_create` is null. | string | ✓ | | -| [region](variables.tf#L110) | Region where instances will be deployed. | string | ✓ | | -| [composer_config](variables.tf#L17) | Composer environment configuration. It accepts only following attributes: `environment_size`, `software_config` and `workloads_config`. See [attribute reference](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/composer_environment#argument-reference---cloud-composer-2) for details on settings variables. | object({…}) | | {…} | -| [iam_bindings_additive](variables.tf#L62) | Map of Role => principal in IAM format (`group:foo@example.org`) to be added on the project. | map(list(string)) | | {} | -| [network_config](variables.tf#L69) | Shared VPC network configurations to use. If null networks will be created in projects with preconfigured values. | object({…}) | | null | -| [project_create](variables.tf#L96) | Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format. | object({…}) | | null | -| [service_encryption_keys](variables.tf#L115) | Cloud KMS keys to use to encrypt resources. Provide a key for each region in use. | map(string) | | null | +| [prefix](variables.tf#L81) | Prefix used for resource names. | string | ✓ | | +| [project_id](variables.tf#L99) | Project id, references existing project if `project_create` is null. | string | ✓ | | +| [region](variables.tf#L104) | Region where instances will be deployed. | string | ✓ | | +| [composer_config](variables.tf#L17) | Composer environment configuration. It accepts only following attributes: `environment_size`, `software_config` and `workloads_config`. See [attribute reference](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/composer_environment#argument-reference---cloud-composer-2) for details on settings variables. | object({…}) | | {…} | +| [iam_bindings_additive](variables.tf#L56) | Map of Role => principal in IAM format (`group:foo@example.org`) to be added on the project. | map(list(string)) | | {} | +| [network_config](variables.tf#L63) | Shared VPC network configurations to use. If null networks will be created in projects with preconfigured values. | object({…}) | | null | +| [project_create](variables.tf#L90) | Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format. | object({…}) | | null | +| [service_encryption_keys](variables.tf#L109) | Cloud KMS keys to use to encrypt resources. Provide a key for each region in use. | map(string) | | null | ## Outputs @@ -128,6 +128,7 @@ service_encryption_keys = { |---|---|:---:| | [composer_airflow_uri](outputs.tf#L17) | The URI of the Apache Airflow Web UI hosted within the Cloud Composer environment.. | | | [composer_dag_gcs](outputs.tf#L22) | The Cloud Storage prefix of the DAGs for the Cloud Composer environment. | | +| [composer_service_account](outputs.tf#L27) | Cloud Composer nodes Service Account email. | | ## Test diff --git a/blueprints/data-solutions/composer-2/outputs.tf b/blueprints/data-solutions/composer-2/outputs.tf index 2b1138a60b..09a821d9cb 100644 --- a/blueprints/data-solutions/composer-2/outputs.tf +++ b/blueprints/data-solutions/composer-2/outputs.tf @@ -23,3 +23,8 @@ output "composer_dag_gcs" { description = "The Cloud Storage prefix of the DAGs for the Cloud Composer environment." value = google_composer_environment.env.config[0].dag_gcs_prefix } + +output "composer_service_account" { + description = "Cloud Composer nodes Service Account email." + value = module.comp-sa.email +} diff --git a/blueprints/data-solutions/composer-2/variables.tf b/blueprints/data-solutions/composer-2/variables.tf index 5a85012779..312e917077 100644 --- a/blueprints/data-solutions/composer-2/variables.tf +++ b/blueprints/data-solutions/composer-2/variables.tf @@ -20,35 +20,29 @@ variable "composer_config" { environment_size = optional(string) software_config = optional(any) workloads_config = optional(object({ - scheduler = optional(object( - { - count = optional(number) - cpu = optional(number) - memory_gb = optional(number) - storage_gb = optional(number) - } - )) + scheduler = optional(object({ + count = optional(number, 1) + cpu = optional(number, 0.5) + memory_gb = optional(number, 2) + storage_gb = optional(number, 1) + }), {}) triggerer = optional(object({ count = number cpu = number memory_gb = number })) - web_server = optional(object( - { - cpu = optional(number) - memory_gb = optional(number) - storage_gb = optional(number) - } - )) - worker = optional(object( - { - cpu = optional(number) - memory_gb = optional(number) - min_count = optional(number) - max_count = optional(number) - storage_gb = optional(number) - } - )) + web_server = optional(object({ + cpu = optional(number, 0.5) + memory_gb = optional(number, 2) + storage_gb = optional(number, 1) + }), {}) + worker = optional(object({ + cpu = optional(number, 0.5) + memory_gb = optional(number, 2) + min_count = optional(number, 1) + max_count = optional(number, 3) + storage_gb = optional(number, 1) + }), {}) })) }) default = {