diff --git a/examples/simple_example/main.tf b/examples/simple_example/main.tf index a3e7f28..ad6a3a3 100644 --- a/examples/simple_example/main.tf +++ b/examples/simple_example/main.tf @@ -63,7 +63,7 @@ module "dataflow-job" { name = "wordcount-terraform-example" on_delete = "cancel" region = "${var.region}" - zone = "${var.region}-a" + zone = "${var.zone}" max_workers = 1 template_gcs_path = "gs://dataflow-templates/latest/Word_Count" temp_gcs_location = "${module.dataflow-bucket.name}" @@ -84,7 +84,7 @@ module "dataflow-job-2" { name = "wordcount-terraform-example-2" on_delete = "cancel" region = "${var.region}" - zone = "${var.region}-a" + zone = "${var.zone}" max_workers = 1 template_gcs_path = "gs://dataflow-templates/latest/Word_Count" temp_gcs_location = "${module.dataflow-bucket.name}" diff --git a/examples/simple_example/variables.tf b/examples/simple_example/variables.tf index 06df9db..ee8736e 100644 --- a/examples/simple_example/variables.tf +++ b/examples/simple_example/variables.tf @@ -19,7 +19,11 @@ variable "project_id" { } variable "region" { - description = "The region in which the bucket and the dataflow job will be deployed" + description = "The region in which the bucket will be deployed" +} + +variable "zone" { + description = "The zone in which the dataflow job will be deployed" } variable "service_account_email" { diff --git a/test/fixtures/simple_example/main.tf b/test/fixtures/simple_example/main.tf index 293b8db..932c0f2 100644 --- a/test/fixtures/simple_example/main.tf +++ b/test/fixtures/simple_example/main.tf @@ -18,6 +18,7 @@ module "example" { source = "../../../examples/simple_example" project_id = "${var.project_id}" region = "${var.region}" + zone = "${var.zone}" service_account_email = "${var.service_account_email}" force_destroy = "true" } diff --git a/test/fixtures/simple_example/variables.tf b/test/fixtures/simple_example/variables.tf index 4cbaa16..0ee2894 100644 --- a/test/fixtures/simple_example/variables.tf +++ b/test/fixtures/simple_example/variables.tf @@ -4,6 +4,12 @@ variable "project_id" { variable "region" { description = "The region to deploy to" + default = "us-east1" +} + +variable "zone" { + description = "The zone to deploy to" + default = "us-central1-a" } variable "service_account_email" { diff --git a/variables.tf b/variables.tf index b12e362..a44e2ac 100644 --- a/variables.tf +++ b/variables.tf @@ -45,7 +45,7 @@ variable "on_delete" { } variable "region" { - description = "The region in which the created job should run." + description = "The region in which the created job should run. Also determines the location of the staging bucket if created." default = "us-central1" } @@ -59,11 +59,6 @@ variable "service_account_email" { default = "" } -variable "region" { - description = "The bucket's region location" - default = "us-central1" -} - variable "subnetwork_self_link" { description = "The subnetwork self link to which VMs will be assigned." default = ""