Skip to content

Commit a4644c0

Browse files
feat: add network tags support for v2 (#48)
1 parent a61f6a7 commit a4644c0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

modules/create_environment_v2/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module "composer" {
4242
| service\_ip\_allocation\_range\_name | The name of the services' secondary range used to allocate IP addresses to the cluster. | `string` | `null` | no |
4343
| subnetwork | The subnetwork to host the composer cluster. | `string` | n/a | yes |
4444
| subnetwork\_region | The subnetwork region of the shared VPC's host (for shared vpc support) | `string` | `""` | no |
45+
| tags | Tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls. | `set(string)` | `[]` | no |
4546
| use\_private\_environment | Enable private environment. | `bool` | `false` | no |
4647
| 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 |
4748
| web\_server\_allowed\_ip\_ranges | The network-level access control policy for the Airflow web server. If unspecified, no network-level access restrictions will be applied. | <pre>list(object({<br> value = string,<br> description = string<br> }))</pre> | `null` | no |

modules/create_environment_v2/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ resource "google_composer_environment" "composer_env" {
4040
network = "projects/${local.network_project_id}/global/networks/${var.network}"
4141
subnetwork = "projects/${local.network_project_id}/regions/${local.subnetwork_region}/subnetworks/${var.subnetwork}"
4242
service_account = var.composer_service_account
43+
tags = var.tags
4344

4445
dynamic "ip_allocation_policy" {
4546
for_each = (var.pod_ip_allocation_range_name != null || var.service_ip_allocation_range_name != null) ? [1] : []

modules/create_environment_v2/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ variable "labels" {
3636
default = {}
3737
}
3838

39+
variable "tags" {
40+
description = "Tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls."
41+
type = set(string)
42+
default = []
43+
}
44+
3945
variable "network" {
4046
type = string
4147
description = "The VPC network to host the composer cluster."

0 commit comments

Comments
 (0)