Skip to content

Commit

Permalink
Confirm that internal_ip_only is settable to false, fix failing test (G…
Browse files Browse the repository at this point in the history
  • Loading branch information
slevenick authored Oct 25, 2024
1 parent 4f8bd93 commit fea2d4e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,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 @@ -168,6 +168,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 @@ -1419,6 +1420,7 @@ resource "google_dataproc_cluster" "accelerated_cluster" {
}

gce_cluster_config {
internal_ip_only = false
subnetwork = "%s"
zone = "%s"
}
Expand Down

0 comments on commit fea2d4e

Please sign in to comment.