Skip to content

Commit

Permalink
Add machine_type to dataflow_job (hashicorp#793)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and Ty Larrabee committed Jun 3, 2019
1 parent 8a82a57 commit 570cc44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions google-beta/resource_dataflow_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func resourceDataflowJob() *schema.Resource {
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},

"machine_type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
},
}
}
Expand Down Expand Up @@ -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,
}

Expand Down
1 change: 1 addition & 0 deletions google-beta/resource_dataflow_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/dataflow_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 570cc44

Please sign in to comment.