Skip to content

Commit 51f2b5b

Browse files
Move enable_shielded_nodes from beta to GA. (#3472) (#2036)
Signed-off-by: Modular Magician <[email protected]>
1 parent df33af9 commit 51f2b5b

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

.changelog/3472.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
container: Moved `google_container_cluster.enable_shielded_nodes` from beta to GA.
3+
```

google-beta/resource_container_cluster_test.go

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,36 @@ func TestAccContainerCluster_nodeAutoprovisioningDefaults(t *testing.T) {
13541354
})
13551355
}
13561356

1357+
func TestAccContainerCluster_withShieldedNodes(t *testing.T) {
1358+
t.Parallel()
1359+
1360+
clusterName := fmt.Sprintf("tf-test-cluster-%s", randString(t, 10))
1361+
1362+
vcrTest(t, resource.TestCase{
1363+
PreCheck: func() { testAccPreCheck(t) },
1364+
Providers: testAccProviders,
1365+
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
1366+
Steps: []resource.TestStep{
1367+
{
1368+
Config: testAccContainerCluster_withShieldedNodes(clusterName, true),
1369+
},
1370+
{
1371+
ResourceName: "google_container_cluster.with_shielded_nodes",
1372+
ImportState: true,
1373+
ImportStateVerify: true,
1374+
},
1375+
{
1376+
Config: testAccContainerCluster_withShieldedNodes(clusterName, false),
1377+
},
1378+
{
1379+
ResourceName: "google_container_cluster.with_shielded_nodes",
1380+
ImportState: true,
1381+
ImportStateVerify: true,
1382+
},
1383+
},
1384+
})
1385+
}
1386+
13571387
func TestAccContainerCluster_withAutoscalingProfile(t *testing.T) {
13581388
t.Parallel()
13591389
clusterName := fmt.Sprintf("cluster-test-%s", randString(t, 10))
@@ -1505,36 +1535,6 @@ func TestAccContainerCluster_withBinaryAuthorization(t *testing.T) {
15051535
})
15061536
}
15071537

1508-
func TestAccContainerCluster_withShieldedNodes(t *testing.T) {
1509-
t.Parallel()
1510-
1511-
clusterName := fmt.Sprintf("tf-test-cluster-%s", randString(t, 10))
1512-
1513-
vcrTest(t, resource.TestCase{
1514-
PreCheck: func() { testAccPreCheck(t) },
1515-
Providers: testAccProviders,
1516-
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
1517-
Steps: []resource.TestStep{
1518-
{
1519-
Config: testAccContainerCluster_withShieldedNodes(clusterName, true),
1520-
},
1521-
{
1522-
ResourceName: "google_container_cluster.with_shielded_nodes",
1523-
ImportState: true,
1524-
ImportStateVerify: true,
1525-
},
1526-
{
1527-
Config: testAccContainerCluster_withShieldedNodes(clusterName, false),
1528-
},
1529-
{
1530-
ResourceName: "google_container_cluster.with_shielded_nodes",
1531-
ImportState: true,
1532-
ImportStateVerify: true,
1533-
},
1534-
},
1535-
})
1536-
}
1537-
15381538
func TestAccContainerCluster_withFlexiblePodCIDR(t *testing.T) {
15391539
t.Parallel()
15401540

@@ -3363,6 +3363,19 @@ resource "google_container_cluster" "with_private_cluster" {
33633363
}
33643364
`, containerNetName, clusterName)
33653365
}
3366+
3367+
func testAccContainerCluster_withShieldedNodes(clusterName string, enabled bool) string {
3368+
return fmt.Sprintf(`
3369+
resource "google_container_cluster" "with_shielded_nodes" {
3370+
name = "%s"
3371+
location = "us-central1-a"
3372+
initial_node_count = 1
3373+
3374+
enable_shielded_nodes = %v
3375+
}
3376+
`, clusterName, enabled)
3377+
}
3378+
33663379
func testAccContainerCluster_sharedVpc(org, billingId, projectName, name string, suffix string) string {
33673380
return fmt.Sprintf(`
33683381
resource "google_project" "host_project" {
@@ -3520,18 +3533,6 @@ resource "google_container_cluster" "with_binary_authorization" {
35203533
`, clusterName, enabled)
35213534
}
35223535

3523-
func testAccContainerCluster_withShieldedNodes(clusterName string, enabled bool) string {
3524-
return fmt.Sprintf(`
3525-
resource "google_container_cluster" "with_shielded_nodes" {
3526-
name = "%s"
3527-
location = "us-central1-a"
3528-
initial_node_count = 1
3529-
3530-
enable_shielded_nodes = %v
3531-
}
3532-
`, clusterName, enabled)
3533-
}
3534-
35353536
func testAccContainerCluster_withFlexiblePodCIDR(containerNetName string, clusterName string) string {
35363537
return fmt.Sprintf(`
35373538
resource "google_compute_network" "container_network" {

website/docs/r/container_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ for more information.
172172
will have statically granted permissions beyond those provided by the RBAC configuration or IAM.
173173
Defaults to `false`
174174

175-
* `enable_shielded_nodes` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Enable Shielded Nodes features on all nodes in this cluster. Defaults to `false`.
175+
* `enable_shielded_nodes` - (Optional) Enable Shielded Nodes features on all nodes in this cluster. Defaults to `false`.
176176

177177
* `initial_node_count` - (Optional) The number of nodes to create in this
178178
cluster's default node pool. In regional or multi-zonal clusters, this is the

0 commit comments

Comments
 (0)