Skip to content

Commit

Permalink
Force send internal_ip_only (#11923) (#19782)
Browse files Browse the repository at this point in the history
[upstream:991966b4652bc7d10cc7545349f33b2a0fceed2a]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 8, 2024
1 parent a808d53 commit 8098ac9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/11923.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
dataproc: fixed a bug in `google_dataproc_cluster` that prevented creation of clusters with `internal_ip_only` set to false
```
1 change: 1 addition & 0 deletions google/services/dataproc/resource_dataproc_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,7 @@ func expandGceClusterConfig(d *schema.ResourceData, config *transport_tpg.Config
}
if v, ok := cfg["internal_ip_only"]; ok {
conf.InternalIpOnly = v.(bool)
conf.ForceSendFields = append(conf.ForceSendFields, "InternalIpOnly")
}
if v, ok := cfg["metadata"]; ok {
conf.Metadata = tpgresource.ConvertStringMap(v.(map[string]interface{}))
Expand Down
11 changes: 11 additions & 0 deletions google/services/dataproc/resource_dataproc_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,10 @@ resource "google_dataproc_cluster" "accelerated_cluster" {
region = "us-central1"
cluster_config {
software_config {
image_version = "2.0.35-debian10"
}
gce_cluster_config {
subnetwork = "%s"
zone = "%s"
Expand Down Expand Up @@ -1651,6 +1655,9 @@ resource "google_dataproc_cluster" "basic" {
region = "us-central1"
cluster_config {
software_config {
image_version = "2.0.35-debian10"
}
gce_cluster_config {
subnetwork = "%s"
zone = "us-central1-f"
Expand Down Expand Up @@ -1763,6 +1770,7 @@ resource "google_dataproc_cluster" "with_init_action" {
# Keep the costs down with smallest config we can get away with
software_config {
image_version = "2.0.35-debian10"
override_properties = {
"dataproc:dataproc.allow.zero.workers" = "true"
}
Expand Down Expand Up @@ -2027,6 +2035,7 @@ resource "google_dataproc_cluster" "with_bucket" {
# Keep the costs down with smallest config we can get away with
software_config {
image_version = "2.0.35-debian10"
override_properties = {
"dataproc:dataproc.allow.zero.workers" = "true"
}
Expand Down Expand Up @@ -2060,6 +2069,7 @@ resource "google_dataproc_cluster" "with_bucket" {
# Keep the costs down with smallest config we can get away with
software_config {
image_version = "2.0.35-debian10"
override_properties = {
"dataproc:dataproc.allow.zero.workers" = "true"
}
Expand Down Expand Up @@ -2249,6 +2259,7 @@ resource "google_dataproc_cluster" "with_service_account" {
cluster_config {
# Keep the costs down with smallest config we can get away with
software_config {
image_version = "2.0.35-debian10"
override_properties = {
"dataproc:dataproc.allow.zero.workers" = "true"
}
Expand Down
1 change: 1 addition & 0 deletions google/services/dataproc/resource_dataproc_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ resource "google_dataproc_cluster" "basic" {
cluster_config {
# Keep the costs down with smallest config we can get away with
software_config {
image_version = "2.0.35-debian10"
override_properties = {
"dataproc:dataproc.allow.zero.workers" = "true"
}
Expand Down

0 comments on commit 8098ac9

Please sign in to comment.