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) (#20037)

[upstream:fea2d4ee77519ede005e874b3c576991c564cbbc]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Oct 25, 2024
1 parent c54f3f1 commit 267ed40
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

```
6 changes: 4 additions & 2 deletions google/services/dataproc/resource_dataproc_cluster_test.go
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 267ed40

Please sign in to comment.