Skip to content

Commit 57e9485

Browse files
committed
fix: operator nsg is not created when cluster is disabled
Signed-off-by: Ali Mukadam <[email protected]>
1 parent 63ea952 commit 57e9485

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

module-extensions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module "extensions" {
55
source = "./modules/extensions"
6-
count = local.operator_enabled ? 1 : 0
6+
count = alltrue([var.create_cluster,local.operator_enabled]) ? 1 : 0
77
region = var.region
88
state_id = local.state_id
99

module-operator.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ locals {
2626
)
2727

2828
// Whether the operator is enabled, i.e. created in this TF state or existing provided by ID
29-
operator_enabled = alltrue([
29+
operator_enabled = anytrue([
3030
(local.cluster_enabled || coalesce(var.cluster_id, "none") != "none"),
3131
(var.create_operator || coalesce(var.operator_private_ip, "none") != "none"),
3232
])

0 commit comments

Comments
 (0)