Loading...
Loading...
Deploy a complete web application stack on Azure
Deploy a complete web app stack using all your Terraform knowledge:
Use variables, tags on all resources, and proper structure.
resource "azurerm_resource_group" "main" {
name = "myapp-prod-rg"
tags = { Environment = "prod", ManagedBy = "Terraform" }
}
resource "azurerm_app_service_plan" "main" {
name = "myapp-prod-asp"
sku { tier = "Standard", size = "S1" }
}
resource "azurerm_app_service" "main" {
name = "myapp-prod-app"
app_service_plan_id = azurerm_app_service_plan.main.id
}
output "app_url" {
value = "https://${azurerm_app_service.main.default_site_hostname}"
}