Search code examples
azureterraformterraform-provider-azureazure-rm

Terraform how to skip argument for 1 workspace


Is it possible to skip 1 argument for 1 workspace in terraform?

resource "azurerm_application_gateway" "appgw" {
  name                = var.appgw
  resource_group_name = var.resource_group
  location            = var.location
  **zones = var.aks_zones**
  sku {
    name = var.app_gateway_sku
    tier = var.app_gateway_tier
  }   

I am setting a DR environment in a region where availability zones are not supported, so for the script to pass the "Zones" argument needs to be skipped for one workspace only. Is this possible?


Solution

  • To fix this, I added an availability_zone = "No-Zone" argument to my AppGW IP address block.