Skip to content

Commit a633ae1

Browse files
committed
Release Channels
1 parent f28ec9f commit a633ae1

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

autogen/cluster.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ resource "google_container_cluster" "primary" {
4545
}
4646
}
4747

48+
{% if beta_cluster %}
49+
dynamic "release_channel" {
50+
for_each = local.release_channel
51+
52+
content {
53+
channel = release_channel.value.channel
54+
}
55+
}
56+
{% endif %}
57+
4858
subnetwork = data.google_compute_subnetwork.gke_subnetwork.self_link
4959
min_master_version = local.master_version
5060

autogen/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ locals {
4848
node_version_zonal = var.node_version != "" && ! var.regional ? var.node_version : local.master_version_zonal
4949
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
5050
node_version = var.regional ? local.node_version_regional : local.node_version_zonal
51+
{% if beta_cluster %}
52+
release_channel = var.enable_release_channel ? [{ channel : var.release_channel }] : []
53+
{% endif %}
54+
5155

5256
custom_kube_dns_config = length(keys(var.stub_domains)) > 0
5357
upstream_nameservers_config = length(var.upstream_nameservers) > 0

autogen/outputs.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,13 @@ output "vertical_pod_autoscaling_enabled" {
150150
value = local.cluster_vertical_pod_autoscaling_enabled
151151
}
152152

153+
output "release_channel_enabled" {
154+
description = "Whether release channel is enabled"
155+
value = var.enable_release_channel
156+
}
157+
158+
output "release_channel" {
159+
description = "The release channel of this cluster"
160+
value = var.release_channel
161+
}
153162
{% endif %}

autogen/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,15 @@ variable "authenticator_security_group" {
411411
default = null
412412
}
413413

414+
variable "enable_release_channel" {
415+
type = bool
416+
description = "(Beta) Whether release channel is configured for this cluster."
417+
default = false
418+
}
419+
420+
variable "release_channel" {
421+
type = string
422+
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
423+
default = "UNSPECIFIED"
424+
}
414425
{% endif %}

0 commit comments

Comments
 (0)