Skip to content

Commit

Permalink
Add internalIpOnly support for Dataproc clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjacques committed Dec 10, 2017
1 parent 355d4f2 commit 737fd7a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions google/resource_dataproc_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ func resourceDataprocCluster() *schema.Resource {
},
Set: stringScopeHashcode,
},

"internal_ip_only": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Default: false,
},
},
},
},
Expand Down Expand Up @@ -479,6 +486,9 @@ func expandGceClusterConfig(cfg map[string]interface{}) *dataproc.GceClusterConf
}
conf.ServiceAccountScopes = scopes
}
if v, ok := cfg["internal_ip_only"]; ok {
conf.InternalIpOnly = v.(bool)
}
return conf
}

Expand Down Expand Up @@ -720,9 +730,10 @@ func flattenInitializationActions(nia []*dataproc.NodeInitializationAction) ([]m
func flattenGceClusterConfig(d *schema.ResourceData, gcc *dataproc.GceClusterConfig) []map[string]interface{} {

gceConfig := map[string]interface{}{
"tags": gcc.Tags,
"service_account": gcc.ServiceAccount,
"zone": extractLastResourceFromUri(gcc.ZoneUri),
"tags": gcc.Tags,
"service_account": gcc.ServiceAccount,
"zone": extractLastResourceFromUri(gcc.ZoneUri),
"internal_ip_only": gcc.InternalIpOnly,
}

if gcc.NetworkUri != "" {
Expand Down

0 comments on commit 737fd7a

Please sign in to comment.