Terraform map ENV variables, not using workspaces

Home   »   Terraform map ENV variables, not using workspaces

resource "azurerm_app_service" "my_service_staging" {
  ...
  site_config {
    ...
  }

  app_settings = {
    VAR_ONE   = lookup(var.env_staging, "VAR_ONE", "default_val")
    VAR_TWO   = var.env_staging["VAR_TWO"]
    VAR_THREE = var.env_staging["VAR_THREE"]
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *