Skip to content

Commit

Permalink
Confirm that internal_ip_only is settable to false, fix failing test …
Browse files Browse the repository at this point in the history
…(#12131) (#8521)

[upstream:fea2d4ee77519ede005e874b3c576991c564cbbc]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 25, 2024
1 parent 67ddf00 commit 051461b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/12131.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func TestAccDataprocCluster_basic(t *testing.T) {
// Default behaviour is for Dataproc to autogen or autodiscover a config bucket
resource.TestCheckResourceAttrSet("google_dataproc_cluster.basic", "cluster_config.0.bucket"),

// Default behavior is for Dataproc to not use only internal IP addresses
resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.gce_cluster_config.0.internal_ip_only", "false"),
// Default behavior as of 2.2+ is for clusters to disallow external IPs by default
resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.gce_cluster_config.0.internal_ip_only", "true"),

// Expect 1 master instances with computed values
resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.master_config.#", "1"),
Expand Down Expand Up @@ -170,6 +170,7 @@ func TestAccDataprocCluster_withAccelerators(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.accelerated_cluster", &cluster),
testAccCheckDataprocClusterAccelerator(&cluster, project, 1, 1),
resource.TestCheckResourceAttr("google_dataproc_cluster.accelerated_cluster", "cluster_config.0.gce_cluster_config.0.internal_ip_only", "false"),
),
},
},
Expand Down Expand Up @@ -1421,6 +1422,7 @@ resource "google_dataproc_cluster" "accelerated_cluster" {
}
gce_cluster_config {
internal_ip_only = false
subnetwork = "%s"
zone = "%s"
}
Expand Down

0 comments on commit 051461b

Please sign in to comment.