diff --git a/main.tf b/main.tf index 94168d7..fc69f04 100644 --- a/main.tf +++ b/main.tf @@ -7,12 +7,13 @@ resource "castai_gke_cluster" "castai_cluster" { } resource "castai_node_configuration" "this" { - for_each = {for k, v in var.node_configurations : k => v} + for_each = { for k, v in var.node_configurations : k => v } cluster_id = castai_gke_cluster.castai_cluster.id name = try(each.value.name, each.key) disk_cpu_ratio = try(each.value.disk_cpu_ratio, 0) + min_disk_size = try(each.value.min_disk_size, 100) subnets = try(each.value.subnets, null) ssh_public_key = try(each.value.ssh_public_key, null) image = try(each.value.image, null) @@ -29,7 +30,7 @@ resource "castai_node_configuration_default" "this" { } resource "castai_node_template" "this" { - for_each = {for k, v in var.node_templates : k => v} + for_each = { for k, v in var.node_templates : k => v } cluster_id = castai_gke_cluster.castai_cluster.id diff --git a/outputs.tf b/outputs.tf index 6019b07..0f61b4f 100644 --- a/outputs.tf +++ b/outputs.tf @@ -6,7 +6,7 @@ output "cluster_id" { output "castai_node_configurations" { description = "Map of node configurations ids by name" - value = { + value = { for k, v in castai_node_configuration.this : v.name => v.id } } diff --git a/variables.tf b/variables.tf index 67361a2..b336b51 100644 --- a/variables.tf +++ b/variables.tf @@ -38,7 +38,7 @@ variable "gke_credentials" { } variable "castai_components_labels" { - type = map + type = map(any) description = "Optional additional Kubernetes labels for CAST AI pods" default = {} } @@ -61,8 +61,8 @@ variable "node_templates" { } variable "install_security_agent" { - type = bool - default = false + type = bool + default = false description = "Optional flag for installation of security agent (https://docs.cast.ai/product-overview/console/security-insights/)" } diff --git a/versions.tf b/versions.tf index fb079fb..87d581a 100644 --- a/versions.tf +++ b/versions.tf @@ -8,7 +8,7 @@ terraform { } castai = { source = "castai/castai" - version = ">= 3.6.0" + version = ">= 3.8.0" } helm = { source = "hashicorp/helm"