Created
July 4, 2021 00:57
-
-
Save xximjasonxx/59e7cd83540589e7a8386fb4897093d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create the app service plan | |
resource "azurerm_app_service_plan" "this" { | |
name = "plan-${var.name}" | |
location = var.rg_location | |
resource_group_name = var.rg_name | |
kind = "Linux" | |
reserved = true | |
sku { | |
tier = "Standard" | |
size = "S1" | |
} | |
} | |
# 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 = { | |
"StorageAccountConnectionString" = var.storage_account_connection_string | |
"WEBSITE_DNS_SERVER" = "168.63.129.16" | |
"WEBSITE_VNET_ROUTE_ALL" = "1" | |
"WEBSITE_RUN_FROM_PACKAGE" = "1" | |
"EventGridEndpoint" = var.eventgrid_endpoint | |
"EventGridAccessKey" = var.eventgrid_access_key | |
} | |
} | |
# create the vnet integration | |
resource "azurerm_app_service_virtual_network_swift_connection" "swiftConnection" { | |
app_service_id = azurerm_app_service.this.id | |
subnet_id = var.subnet_id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment