From 570cc443ab4da78282c7d37a8ecb38a4afad6cc1 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 3 Jun 2019 15:03:14 -0700 Subject: [PATCH] Add machine_type to dataflow_job (#793) Signed-off-by: Modular Magician --- google-beta/resource_dataflow_job.go | 7 +++++++ google-beta/resource_dataflow_job_test.go | 1 + website/docs/r/dataflow_job.html.markdown | 1 + 3 files changed, 9 insertions(+) diff --git a/google-beta/resource_dataflow_job.go b/google-beta/resource_dataflow_job.go index ce9c15e93f8..0cdef5da2ce 100644 --- a/google-beta/resource_dataflow_job.go +++ b/google-beta/resource_dataflow_job.go @@ -110,6 +110,12 @@ func resourceDataflowJob() *schema.Resource { ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, }, + + "machine_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, }, } } @@ -140,6 +146,7 @@ func resourceDataflowJobCreate(d *schema.ResourceData, meta interface{}) error { ServiceAccountEmail: d.Get("service_account_email").(string), Subnetwork: d.Get("subnetwork").(string), TempLocation: d.Get("temp_gcs_location").(string), + MachineType: d.Get("machine_type").(string), Zone: zone, } diff --git a/google-beta/resource_dataflow_job_test.go b/google-beta/resource_dataflow_job_test.go index a98d62f2d43..4f32e1f1505 100644 --- a/google-beta/resource_dataflow_job_test.go +++ b/google-beta/resource_dataflow_job_test.go @@ -332,6 +332,7 @@ resource "google_dataflow_job" "big_data" { template_gcs_path = "gs://dataflow-templates/wordcount/template_file" temp_gcs_location = "${google_storage_bucket.temp.url}" + machine_type = "n1-standard-2" parameters = { inputFile = "gs://dataflow-samples/shakespeare/kinglear.txt" diff --git a/website/docs/r/dataflow_job.html.markdown b/website/docs/r/dataflow_job.html.markdown index 2bdb15b4f9a..c2340e7f8f1 100644 --- a/website/docs/r/dataflow_job.html.markdown +++ b/website/docs/r/dataflow_job.html.markdown @@ -52,6 +52,7 @@ The following arguments are supported: * `service_account_email` - (Optional) The Service Account email used to create the job. * `network` - (Optional) The network to which VMs will be assigned. If it is not provided, "default" will be used. * `subnetwork` - (Optional) The subnetwork to which VMs will be assigned. Should be of the form "regions/REGION/subnetworks/SUBNETWORK". +* `machine_type` - (Optional) The machine type to use for the job. ## Attributes Reference