Skip to content

Commit

Permalink
feat: Add support for additional_experiments dataflow job field (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
averbuks authored Dec 14, 2023
1 parent a02a530 commit 5e1c674
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Then perform the following commands on the root folder:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| additional\_experiments | List of experiments that should be used by the job. An example value is `['enable_stackdriver_agent_metrics']` | `list(string)` | `[]` | no |
| ip\_configuration | The configuration for VM IPs. Options are 'WORKER\_IP\_PUBLIC' or 'WORKER\_IP\_PRIVATE'. | `string` | `null` | no |
| kms\_key\_name | The name for the Cloud KMS key for the job. Key format is: projects/PROJECT\_ID/locations/LOCATION/keyRings/KEY\_RING/cryptoKeys/KEY | `string` | `null` | no |
| labels | User labels to be specified for the job. | `map(string)` | `{}` | no |
Expand Down
33 changes: 17 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@
*/

resource "google_dataflow_job" "dataflow_job" {
project = var.project_id
region = var.region
zone = var.zone
name = var.name
on_delete = var.on_delete
max_workers = var.max_workers
template_gcs_path = var.template_gcs_path
temp_gcs_location = "gs://${var.temp_gcs_location}/tmp_dir"
parameters = var.parameters
service_account_email = var.service_account_email
network = var.network_self_link
subnetwork = var.subnetwork_self_link
machine_type = var.machine_type
ip_configuration = var.ip_configuration
kms_key_name = var.kms_key_name
labels = var.labels
project = var.project_id
region = var.region
zone = var.zone
name = var.name
on_delete = var.on_delete
max_workers = var.max_workers
template_gcs_path = var.template_gcs_path
temp_gcs_location = "gs://${var.temp_gcs_location}/tmp_dir"
parameters = var.parameters
service_account_email = var.service_account_email
network = var.network_self_link
subnetwork = var.subnetwork_self_link
machine_type = var.machine_type
ip_configuration = var.ip_configuration
additional_experiments = var.additional_experiments
kms_key_name = var.kms_key_name
labels = var.labels
}

6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ variable "labels" {
description = "User labels to be specified for the job."
default = {}
}

variable "additional_experiments" {
type = list(string)
description = "List of experiments that should be used by the job. An example value is `['enable_stackdriver_agent_metrics']`"
default = []
}

0 comments on commit 5e1c674

Please sign in to comment.