diff --git a/statefulset.tf b/statefulset.tf index ba70664..7534d8d 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.instance_co_location == true ? [ ] : [1] + for_each = var.share_instance == true ? [ ] : [1] content { pod_anti_affinity { preferred_during_scheduling_ignored_during_execution { diff --git a/variables.tf b/variables.tf index 62cc9ca..662689a 100755 --- a/variables.tf +++ b/variables.tf @@ -106,8 +106,8 @@ variable "devmode_enabled" { default = false } -variable "instance_co_location" { +variable "share_instance" { description = "Avoid co location of the replicas on the same node" type = bool - default = false + default = true }