Skip to content

Commit 7ffbe92

Browse files
authored
Update resource_container_cluster_test.go.tmpl to support membership_type
1 parent 8b4cf33 commit 7ffbe92

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5819,6 +5819,15 @@ func TestAccContainerCluster_withFleetConfig(t *testing.T) {
58195819
ImportStateVerify: true,
58205820
ImportStateVerifyIgnore: []string{"deletion_protection"},
58215821
},
5822+
{
5823+
Config: testAccContainerCluster_withFleetConfigLightweightMembership(clusterName, projectID, networkName, subnetworkName),
5824+
},
5825+
{
5826+
ResourceName: "google_container_cluster.primary",
5827+
ImportState: true,
5828+
ImportStateVerify: true,
5829+
ImportStateVerifyIgnore: []string{"deletion_protection"},
5830+
},
58225831
},
58235832
})
58245833
}
@@ -5945,6 +5954,26 @@ resource "google_container_cluster" "primary" {
59455954
`, resource_name, networkName, subnetworkName)
59465955
}
59475956

5957+
func testAccContainerCluster_withFleetConfigLightweightMembership(name, projectID, networkName, subnetworkName string) string {
5958+
return fmt.Sprintf(`
5959+
resource "google_container_cluster" "primary" {
5960+
name = "%s"
5961+
location = "us-central1-a"
5962+
initial_node_count = 1
5963+
5964+
fleet {
5965+
project = "%s"
5966+
membership_type = "LIGHTWEIGHT"
5967+
}
5968+
5969+
network = "%s"
5970+
subnetwork = "%s"
5971+
5972+
deletion_protection = false
5973+
}
5974+
`, name, projectID, networkName, subnetworkName)
5975+
}
5976+
59485977
func testAccContainerCluster_withIncompatibleMasterVersionNodeVersion(name, networkName, subnetworkName string) string {
59495978
return fmt.Sprintf(`
59505979
resource "google_container_cluster" "gke_cluster" {

0 commit comments

Comments
 (0)