Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Last active July 5, 2021 18:58
Show Gist options
  • Save xximjasonxx/83137dd46708163cc9fee160f18306eb to your computer and use it in GitHub Desktop.
Save xximjasonxx/83137dd46708163cc9fee160f18306eb to your computer and use it in GitHub Desktop.
# create the app service
resource "azurerm_app_service" "this" {
name = "app-${var.name}ym05"
resource_group_name = var.rg_name
location = var.rg_location
app_service_plan_id = azurerm_app_service_plan.this.id
site_config {
dotnet_framework_version = "v5.0"
}
app_settings = {
"WEBSITE_DNS_SERVER" = "168.63.129.16"
"WEBSITE_VNET_ROUTE_ALL" = "1"
"WEBSITE_RUN_FROM_PACKAGE" = "1"
"EventGridEndpoint" = var.eventgrid_endpoint
"KeyVaultEndpoint" = var.keyvault_endpoint
}
identity {
type = "SystemAssigned"
}
}
# outputs
output "system_id" {
value = azurerm_app_service.this.identity.0.principal_id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment