Skip to content

Commit ad5872b

Browse files
committed
Terraform samples for switching no channel cluster to a release channel.
1 parent c80cf41 commit ad5872b

File tree

1 file changed

+27
-12
lines changed
  • gke/standard/zonal/no-channel-to-release-channel

1 file changed

+27
-12
lines changed

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

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
[START gke_standard_release_channel_none]
1+
/**
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
# [START gke_standard_release_channel_none]
218
resource "google_container_cluster" "rc_none" {
319
name = "cluster-zonal-example-none-to-rc"
420
location = "us-central1-a"
@@ -26,9 +42,9 @@ resource "google_container_node_pool" "rc_none" {
2642
auto_upgrade = false
2743
}
2844
}
29-
[END gke_standard_release_channel_none]
45+
# [END gke_standard_release_channel_none]
3046

31-
[START gke_standard_release_channel_no_upgrade]
47+
# [START gke_standard_release_channel_no_upgrade]
3248
resource "google_container_cluster" "no_upgrade" {
3349
name = "cluster-zonal-example-none-to-rc"
3450
location = "us-central1-a"
@@ -65,7 +81,7 @@ resource "google_container_cluster" "no_upgrade" {
6581

6682
resource "google_container_node_pool" "no_upgrade" {
6783
name = "cluster-zonal-example-none-to-rc-node-pool"
68-
cluster = google_container_cluster.no_upgrade.name
84+
cluster = google_container_cluster.no_upgrade.name
6985

7086
node_count = 2
7187

@@ -74,9 +90,9 @@ resource "google_container_node_pool" "no_upgrade" {
7490
auto_upgrade = false
7591
}
7692
}
77-
[END gke_standard_release_channel_no_upgrade]
93+
# [END gke_standard_release_channel_no_upgrade]
7894

79-
[START gke_standard_release_channel_rc_regular]
95+
# [START gke_standard_release_channel_rc_regular]
8096
resource "google_container_cluster" "rc_regular" {
8197
name = "cluster-zonal-example-none-to-rc"
8298
location = "us-central1-a"
@@ -111,7 +127,7 @@ resource "google_container_cluster" "rc_regular" {
111127

112128
resource "google_container_node_pool" "rc_regular" {
113129
name = "cluster-zonal-example-none-to-rc-node-pool"
114-
cluster = google_container_cluster.rc_regular.name
130+
cluster = google_container_cluster.rc_regular.name
115131

116132
node_count = 2
117133

@@ -122,9 +138,9 @@ resource "google_container_node_pool" "rc_regular" {
122138
auto_upgrade = true
123139
}
124140
}
125-
[END gke_standard_release_channel_rc_regular]
141+
# [END gke_standard_release_channel_rc_regular]
126142

127-
[START gke_standard_release_channel_no_minor_or_node_upgrade]
143+
# [START gke_standard_release_channel_no_minor_or_node_upgrade]
128144
resource "google_container_cluster" "no_minor_or_node_upgrade" {
129145
name = "cluster-zonal-example-none-to-rc"
130146
location = "us-central1-a"
@@ -160,7 +176,7 @@ resource "google_container_cluster" "no_minor_or_node_upgrade" {
160176

161177
resource "google_container_node_pool" "no_minor_or_node_upgrade" {
162178
name = "cluster-zonal-example-none-to-rc-node-pool"
163-
cluster = google_container_cluster.no_minor_or_node_upgrade.name
179+
cluster = google_container_cluster.no_minor_or_node_upgrade.name
164180

165181
node_count = 2
166182

@@ -169,5 +185,4 @@ resource "google_container_node_pool" "no_minor_or_node_upgrade" {
169185
auto_upgrade = true
170186
}
171187
}
172-
[END gke_standard_release_channel_no_minor_or_node_upgrade]
173-
188+
# [END gke_standard_release_channel_no_minor_or_node_upgrade]

0 commit comments

Comments
 (0)