Skip to content

Instantly share code, notes, and snippets.

@dilani14
Last active September 28, 2020 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dilani14/8c06351de1d705d49ee04d2bec35549b to your computer and use it in GitHub Desktop.
Save dilani14/8c06351de1d705d49ee04d2bec35549b to your computer and use it in GitHub Desktop.
App Service Plan
locals {
env-dev = var.environment == "dev"
}
#######################################
##### App Service Plan ################
#######################################
resource "azurerm_app_service_plan" "azuredemo-as-asp" {
name = "${var.environment}-${var.service}-asp"
resource_group_name = "resource_group_name"
location = "resource_group_location"
app_service_environment_id = local.env-dev ? null : var.app_service_environment_id
sku {
tier = local.env-dev ? "Standard" : "Isolated"
size = local.env-dev ? "S1" : "I1"
capacity = local.env-dev ? null : 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment