Skip to content

Commit

Permalink
Merge branch 'AZ-1405_add_ternary_condition_for_zone_balancing' into …
Browse files Browse the repository at this point in the history
…'master'

feat(AZ-1405): add ternary condition for `zone_balancing_enabled` parameter

Closes AZ-1405

See merge request claranet/projects/cloud/azure/terraform/modules/app-service-plan!34
  • Loading branch information
Shr3ps committed May 3, 2024
2 parents bd05a17 + 86a825c commit 7d90a17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
locals {
zone_balancing_enabled = var.sku_name == "Y1" ? false : var.zone_balancing_enabled
worker_count = var.sku_name == "Y1" ? null : var.worker_count
}
4 changes: 2 additions & 2 deletions resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ resource "azurerm_service_plan" "plan" {

os_type = var.os_type
sku_name = var.sku_name
zone_balancing_enabled = var.zone_balancing_enabled
zone_balancing_enabled = local.zone_balancing_enabled

worker_count = var.sku_name == "Y1" ? null : var.worker_count
worker_count = local.worker_count
maximum_elastic_worker_count = var.maximum_elastic_worker_count

app_service_environment_id = var.app_service_environment_id
Expand Down

0 comments on commit 7d90a17

Please sign in to comment.