Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Autopilot Support for cluster_autoscaling Configuration in GKE Module #1131

Merged
merged 3 commits into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion modules/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,17 @@ resource "google_container_cluster" "cluster" {
dynamic "cluster_autoscaling" {
for_each = var.cluster_autoscaling == null ? [] : [""]
content {
enabled = true
enabled = var.enable_features.autopilot ? null : true
juliocc marked this conversation as resolved.
Show resolved Hide resolved

dynamic "auto_provisioning_defaults" {
for_each = var.cluster_autoscaling.auto_provisioning_defaults != null ? [""] : []
content {
boot_disk_kms_key = var.cluster_autoscaling.auto_provisioning_defaults.boot_disk_kms_key
image_type = var.cluster_autoscaling.auto_provisioning_defaults.image_type
oauth_scopes = var.cluster_autoscaling.auto_provisioning_defaults.oauth_scopes
service_account = var.cluster_autoscaling.auto_provisioning_defaults.service_account
}
}
dynamic "resource_limits" {
for_each = var.cluster_autoscaling.cpu_limits != null ? [""] : []
content {
Expand Down