You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/simple_composer_env_v2/README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Simple Cloud Composer Environment (V2) Example
2
2
3
-
This example illustrates how to use the `composer` module.
3
+
This example illustrates how to use the `composer` V2 module to deploy private composer environment with private GKE cluster, CloudSql instance and use private service connect (PSC) endpoint to connect to CloudSql instance. `use_private_environment` and `enable_private_endpoint` needs to be `true` to deploy private GKE cluster and CloudSql instance. `cloud_composer_connection_subnetwork` value will result in PSC endpoint for CloudSql instance.
4
+
5
+
This example also creates a Cloud Storage Bucket for scheduled snapshots and assign appropriate permission(s) to Composer Service Account on the bucket.
4
6
5
7
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6
8
## Inputs
@@ -14,7 +16,8 @@ This example illustrates how to use the `composer` module.
14
16
| project\_id | Project ID where Cloud Composer Environment is created. |`string`| n/a | yes |
15
17
| region | Region where Cloud Composer Environment is created. |`string`| n/a | yes |
16
18
| service\_ip\_allocation\_range\_name | The name of the services' secondary range used to allocate IP addresses to the cluster. |`string`| n/a | yes |
17
-
| subnetwork | Subetwork where Cloud Composer is created. |`string`| n/a | yes |
19
+
| subnetwork | Name of the Subetwork where Cloud Composer is created. |`string`| n/a | yes |
20
+
| subnetwork\_self\_link | self\_link of the Subetwork where Cloud Composer is created. |`string`| n/a | yes |
| airflow\_config\_overrides | Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example "core-dags\_are\_paused\_at\_creation". |`map(string)`|`{}`| no |
20
-
| cloud\_composer\_connection\_subnetwork | When specified, the environment will use Private Service Connect instead of VPC peerings to connect to Cloud SQL in the Tenant Project |`string`|`null`| no |
21
-
| cloud\_composer\_network\_ipv4\_cidr\_block | The CIDR block from which IP range in tenant project will be reserved. |`string`|`null`| no |
60
+
| cloud\_composer\_connection\_subnetwork |Subnetwork self-link. When specified, the environment will use Private Service Connect instead of VPC peerings to connect to CloudSQL in the Tenant Project. IP address of psc endpoint is allocated from this subnet|`string`|`null`| no |
61
+
| cloud\_composer\_network\_ipv4\_cidr\_block | The CIDR block from which IP range in tenant project will be reserved. Required if VPC peering is used to connect to CloudSql instead of PSC |`string`|`null`| no |
22
62
| cloud\_data\_lineage\_integration | Whether or not Dataplex data lineage integration is enabled. Cloud Composer environments in versions composer-2.1.2-airflow-..* and newer) |`bool`|`false`| no |
23
-
| cloud\_sql\_ipv4\_cidr | The CIDR block from which IP range in tenant project will be reserved for Cloud SQL.|`string`|`null`| no |
63
+
| cloud\_sql\_ipv4\_cidr | The CIDR block from which IP range in tenant project will be reserved for Cloud SQL private service access. Required if VPC peering is used to connect to CloudSql instead of PSC|`string`|`null`| no |
24
64
| composer\_env\_name | Name of Cloud Composer Environment |`string`| n/a | yes |
25
65
| composer\_service\_account | Service Account for running Cloud Composer. |`string`|`null`| no |
26
66
| enable\_ip\_masq\_agent | Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for all destination addresses, except between pods traffic. |`bool`|`false`| no |
27
-
| enable\_private\_endpoint | Configure public access to the cluster endpoint. |`bool`|`false`| no |
67
+
| enable\_private\_endpoint | Configure private access to the cluster endpoint. If true, access to the public endpoint of the GKE cluster is denied|`bool`|`false`| no |
28
68
| env\_variables | Variables of the airflow environment. |`map(string)`|`{}`| no |
29
-
| environment\_size | The environment size controls the performance parameters of the managed Cloud Composer infrastructure that includes the Airflow database. Values for environment size are: ENVIRONMENT\_SIZE\_SMALL, ENVIRONMENT\_SIZE\_MEDIUM, and ENVIRONMENT\_SIZE\_LARGE. |`string`|`"ENVIRONMENT_SIZE_MEDIUM"`| no |
69
+
| environment\_size | The environment size controls the performance parameters of the managed Cloud Composer infrastructure that includes the Airflow database. Values for environment size are: `ENVIRONMENT_SIZE_SMALL`, `ENVIRONMENT_SIZE_MEDIUM`, and `ENVIRONMENT_SIZE_LARGE`. |`string`|`"ENVIRONMENT_SIZE_MEDIUM"`| no |
30
70
| grant\_sa\_agent\_permission | Cloud Composer relies on Workload Identity as Google API authentication mechanism for Airflow. |`bool`|`true`| no |
31
71
| image\_version | The version of the aiflow running in the cloud composer environment. |`string`|`"composer-2.5.0-airflow-2.6.3"`| no |
32
72
| labels | The resource labels (a map of key/value pairs) to be applied to the Cloud Composer. |`map(string)`|`{}`| no |
33
73
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format |`string`|`null`| no |
34
74
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. |`string`|`null`| no |
35
75
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format |`string`|`"05:00"`| no |
36
-
| maintenance\_window | The recovery configuration settings for the Cloud Composer environment | <pre>object({<br> start_time = string<br> end_time = string<br> recurrence = string<br> })</pre> |`null`| no |
37
76
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | <pre>list(object({<br> cidr_block = string<br> display_name = string<br> }))</pre> |`[]`| no |
38
-
| master\_ipv4\_cidr | The CIDR block from which IP range in tenant project will be reserved for the master. |`string`|`null`| no |
77
+
| master\_ipv4\_cidr | The CIDR block from which IP range in tenant project will be reserved for the GKE master. Required when `use_private_environment` and `enable_private_endpoint` is `true`|`string`|`null`| no |
39
78
| network | The VPC network to host the composer cluster. |`string`| n/a | yes |
40
79
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) |`string`|`""`| no |
41
-
| pod\_ip\_allocation\_range\_name | The name of the cluster's secondary range used to allocate IP addresses to pods. |`string`|`null`| no |
80
+
| pod\_ip\_allocation\_range\_name | The name of the subnet secondary range, used to allocate IP addresses for the pods. |`string`|`null`| no |
42
81
| project\_id | Project ID where Cloud Composer Environment is created. |`string`| n/a | yes |
43
82
| pypi\_packages | Custom Python Package Index (PyPI) packages to be installed in the environment. Keys refer to the lowercase package name (e.g. "numpy"). |`map(string)`|`{}`| no |
44
83
| region | Region where the Cloud Composer Environment is created. |`string`|`"us-central1"`| no |
45
84
| resilience\_mode | Cloud Composer 2.1.15 or newer only. The resilience mode states whether high resilience is enabled for the environment or not. Values for resilience mode are `HIGH_RESILIENCE` for high resilience and `STANDARD_RESILIENCE` for standard resilience |`string`|`null`| no |
46
85
| scheduled\_snapshots\_config | The recovery configuration settings for the Cloud Composer environment | <pre>object({<br> enabled = optional(bool, false)<br> snapshot_location = optional(string)<br> snapshot_creation_schedule = optional(string)<br> time_zone = optional(string)<br> })</pre> |`null`| no |
47
86
| scheduler | Configuration for resources used by Airflow schedulers. | <pre>object({<br> cpu = string<br> memory_gb = number<br> storage_gb = number<br> count = number<br> })</pre> | <pre>{<br> "count": 2,<br> "cpu": 2,<br> "memory_gb": 7.5,<br> "storage_gb": 5<br>}</pre> | no |
48
-
| service\_ip\_allocation\_range\_name | The name of the services' secondary range used to allocate IP addresses to the cluster. |`string`|`null`| no |
87
+
| service\_ip\_allocation\_range\_name | The name of the subnet secondary range, used to allocate IP addresses for the Services. |`string`|`null`| no |
49
88
| storage\_bucket | Name of an existing Cloud Storage bucket to be used by the environment |`string`|`null`| no |
50
-
| subnetwork | The subnetwork to host the composer cluster. |`string`| n/a | yes |
89
+
| subnetwork | The name of the subnetwork to host the composer cluster. |`string`| n/a | yes |
51
90
| subnetwork\_region | The subnetwork region of the shared VPC's host (for shared vpc support) |`string`|`""`| no |
52
91
| tags | Tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls. |`set(string)`|`[]`| no |
53
92
| triggerer | Configuration for resources used by Airflow triggerer | <pre>object({<br> cpu = string<br> memory_gb = number<br> count = number<br> })</pre> |`null`| no |
54
-
| use\_private\_environment |Enable private environment. |`bool`|`false`| no |
93
+
| use\_private\_environment |Create a private environment. |`bool`|`false`| no |
55
94
| web\_server | Configuration for resources used by Airflow web server. | <pre>object({<br> cpu = string<br> memory_gb = number<br> storage_gb = number<br> })</pre> | <pre>{<br> "cpu": 2,<br> "memory_gb": 7.5,<br> "storage_gb": 5<br>}</pre> | no |
56
95
| worker | Configuration for resources used by Airflow workers. | <pre>object({<br> cpu = string<br> memory_gb = number<br> storage_gb = number<br> min_count = number<br> max_count = number<br> })</pre> | <pre>{<br> "cpu": 2,<br> "max_count": 6,<br> "memory_gb": 7.5,<br> "min_count": 2,<br> "storage_gb": 5<br>}</pre> | no |
57
96
@@ -60,6 +99,7 @@ module "composer" {
60
99
| Name | Description |
61
100
|------|-------------|
62
101
| airflow\_uri | URI of the Apache Airflow Web UI hosted within the Cloud Composer Environment. |
102
+
| composer\_env | Cloud Composer Environment |
63
103
| composer\_env\_id | ID of Cloud Composer Environment. |
64
104
| composer\_env\_name | Name of the Cloud Composer Environment. |
65
105
| gcs\_bucket | Google Cloud Storage bucket which hosts DAGs for the Cloud Composer Environment. |
0 commit comments