Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-12 00:58 | #8 | cancelled |
Clean
|
| 2025-07-10 05:06 | #7 | processing |
Clean
|
| 2025-07-09 23:22 | #6 | cancelled |
Clean
|
# Configure the Azure provider
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0.0"
}
}
}
provider "azurerm" {
features {}
}
# Generate a random integer to create a globally unique name
resource "random_integer" "ri" {
min = 10000
max = 99999
}
# Create the resource group
resource "azurerm_resource_group" "rg" {
name = "rg-${random_integer.ri.result}"
location = "eastus"
}
# Create the Windows App Service Plan
resource "azurerm_service_plan" "windows_appserviceplan" {
name = "windows-asp-${random_integer.ri.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
os_type = "WindowsContainer"
sku_name = "P1v3"
}
# Create the Windows Web App with a container
resource "azurerm_windows_web_app" "windows_webapp" {
name = "windows-webapp-${random_integer.ri.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
service_plan_id = azurerm_service_plan.windows_appserviceplan.id
site_config {
always_on = true
app_command_line = ""
application_stack {
docker_container_name = "mcr.microsoft.com/dotnet/framework/samples"
docker_container_tag = "aspnetapp"
}
}
app_settings = {
DOCKER_REGISTRY_SERVER_USERNAME = ""
DOCKER_REGISTRY_SERVER_PASSWORD = ""
DOCKER_REGISTRY_SERVER_URL = "https://mcr.microsoft.com"
WEBSITES_ENABLE_APP_SERVICE_STORAGE = "false"
}
}