diff --git a/statefulset.tf b/statefulset.tf index 7534d8d..c7ead5c 100755 --- a/statefulset.tf +++ b/statefulset.tf @@ -34,7 +34,7 @@ resource "kubernetes_stateful_set" "axonserver" { termination_grace_period_seconds = 120 dynamic "affinity" { - for_each = var.share_instance == true ? [ ] : [1] + for_each = var.assign_pods_to_different_nodes == true ? [1] : [ ] content { pod_anti_affinity { preferred_during_scheduling_ignored_during_execution { diff --git a/variables.tf b/variables.tf index 662689a..a5f324e 100755 --- a/variables.tf +++ b/variables.tf @@ -106,8 +106,8 @@ variable "devmode_enabled" { default = false } -variable "share_instance" { +variable "assign_pods_to_different_nodes" { description = "Avoid co location of the replicas on the same node" type = bool - default = true + default = false }