Skip to content

Commit 93d94ca

Browse files
committed
Terraform samples for switching no channel cluster to a release channel.
1 parent d2ebf02 commit 93d94ca

File tree

1 file changed

+10
-7
lines changed
  • gke/standard/zonal/no-channel-to-release-channel

1 file changed

+10
-7
lines changed

gke/standard/zonal/no-channel-to-release-channel/main.tf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
# NOTE: Locations are different in these examples to satisfy the tests.
18+
# These are intended to represent sequential steps on the same cluster.
19+
1720
# [START gke_standard_release_channel_none]
1821
resource "google_container_cluster" "rc_none" {
1922
name = "cluster-zonal-example-none-to-rc"
@@ -32,7 +35,7 @@ resource "google_container_cluster" "rc_none" {
3235
}
3336

3437
resource "google_container_node_pool" "rc_none" {
35-
name = "cluster-zonal-example-none-to-rc-node-pool"
38+
name = "cluster-zonal-example-none-to-rc-np"
3639
cluster = google_container_cluster.rc_none.name
3740

3841
node_count = 2
@@ -47,7 +50,7 @@ resource "google_container_node_pool" "rc_none" {
4750
# [START gke_standard_release_channel_no_upgrade]
4851
resource "google_container_cluster" "no_upgrade" {
4952
name = "cluster-zonal-example-none-to-rc"
50-
location = "us-central1-a"
53+
location = "us-central1-b"
5154

5255
release_channel {
5356
channel = "UNSPECIFIED"
@@ -80,7 +83,7 @@ resource "google_container_cluster" "no_upgrade" {
8083
}
8184

8285
resource "google_container_node_pool" "no_upgrade" {
83-
name = "cluster-zonal-example-none-to-rc-node-pool"
86+
name = "cluster-zonal-example-none-to-rc-np"
8487
cluster = google_container_cluster.no_upgrade.name
8588

8689
node_count = 2
@@ -95,7 +98,7 @@ resource "google_container_node_pool" "no_upgrade" {
9598
# [START gke_standard_release_channel_rc_regular]
9699
resource "google_container_cluster" "rc_regular" {
97100
name = "cluster-zonal-example-none-to-rc"
98-
location = "us-central1-a"
101+
location = "us-central1-c"
99102

100103
release_channel {
101104
channel = "REGULAR"
@@ -126,7 +129,7 @@ resource "google_container_cluster" "rc_regular" {
126129
}
127130

128131
resource "google_container_node_pool" "rc_regular" {
129-
name = "cluster-zonal-example-none-to-rc-node-pool"
132+
name = "cluster-zonal-example-none-to-rc-np"
130133
cluster = google_container_cluster.rc_regular.name
131134

132135
node_count = 2
@@ -143,7 +146,7 @@ resource "google_container_node_pool" "rc_regular" {
143146
# [START gke_standard_release_channel_no_minor_or_node_upgrade]
144147
resource "google_container_cluster" "no_minor_or_node_upgrade" {
145148
name = "cluster-zonal-example-none-to-rc"
146-
location = "us-central1-a"
149+
location = "us-central1-d"
147150

148151
release_channel {
149152
channel = "REGULAR"
@@ -175,7 +178,7 @@ resource "google_container_cluster" "no_minor_or_node_upgrade" {
175178
}
176179

177180
resource "google_container_node_pool" "no_minor_or_node_upgrade" {
178-
name = "cluster-zonal-example-none-to-rc-node-pool"
181+
name = "cluster-zonal-example-none-to-rc-np"
179182
cluster = google_container_cluster.no_minor_or_node_upgrade.name
180183

181184
node_count = 2

0 commit comments

Comments
 (0)