Need help on terraform code. Used this link to create the webapp with webjob however its not getting deployed with null resource Deploy Azure WebJob using Terraform – Marián Košťál (mariankostal.com)
# ref: https://learn.microsoft.com/en-us/azure/azure-functions/functions-compare-logic-apps-ms-flow-webjobs#compare-functions-and-webjobs
# ref: https://learn.microsoft.com/en-us/azure/app-service/webjobs-create?tabs=windowscode
# ref: https://mariankostal.com/2021/03/06/create-infrastructure-for-azure-webjob-using-terraform/
resource "azurerm_app_service_plan" "webjob_integration_test_service_plan" {
name = var.resource_group_name
location = module.azure_region.location
resource_group_name = data.azurerm_resource_group.this.location
sku {
tier = "Basic"
size = "B1"
}
}
resource "azurerm_app_service" "webjob_integration_test_app_service" {
name = module.naming.app_service.name_unique
location = module.azure_region.location
resource_group_name = data.azurerm_resource_group.this.location
app_service_plan_id = azurerm_app_service_plan.webjob_integration_test_service_plan.id
client_affinity_enabled = false
site_config {
use_32_bit_worker_process = false
always_on = false
}
app_settings = {
"APPINSIGHTS_INSTRUMENTATIONKEY" = azurerm_application_insights.ai.instrumentation_key
}
connection_string {
name = "AzureWebJobsDashboard"
type = "Custom"
value = "DefaultEndpointsProtocol=https;AccountName=${lower(data.azurerm_resource_group.this.location)};AccountKey=${azurerm_storage_account.sa.primary_access_key};EndpointSuffix=core.windows.net"
}
connection_string {
name = "AzureWebJobsStorage"
type = "Custom"
value = "DefaultEndpointsProtocol=https;AccountName=${lower(data.azurerm_resource_group.this.location)};AccountKey=${azurerm_storage_account.sa.primary_access_key};EndpointSuffix=core.windows.net"
}
identity {
type = "SystemAssigned"
}
tags = merge(local.default_tags, local.extra_tags)
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.