Default nodepool creation fix (#999)
* Default nodepool creation fix * Removed comments and fixded formatting with fmt * Refactored per PR comment Co-authored-by: Astian Seb <sgrabski@google.com> Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
parent
cb9a87dee4
commit
345cb4b7fa
|
@ -48,7 +48,18 @@ resource "google_container_cluster" "cluster" {
|
||||||
enable_autopilot = var.enable_features.autopilot ? true : null
|
enable_autopilot = var.enable_features.autopilot ? true : null
|
||||||
|
|
||||||
# the default nodepool is deleted here, use the gke-nodepool module instead
|
# the default nodepool is deleted here, use the gke-nodepool module instead
|
||||||
# node_config {}
|
# default nodepool configuration based on a shielded_nodes variable
|
||||||
|
node_config {
|
||||||
|
dynamic "shielded_instance_config" {
|
||||||
|
for_each = var.enable_features.shielded_nodes ? [""] : []
|
||||||
|
content {
|
||||||
|
enable_secure_boot = true
|
||||||
|
enable_integrity_monitoring = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addons_config {
|
addons_config {
|
||||||
dynamic "dns_cache_config" {
|
dynamic "dns_cache_config" {
|
||||||
|
|
Loading…
Reference in New Issue