我目前正在尝试通过Terraform将自定义Windows Docker容器部署到Azure中用于容器的Web应用程序中。我的代码如下:
resource "azurerm_app_service_plan" "container_service_plan" {
name = "${var.builderName}"
location = "${azurerm_resource_group.rg.location}"
resource_group_name = "${azurerm_resource_group.rg.name}"
kind = "xenon"
is_xenon = true
sku {
tier = "PremiumContainer"
size = "PC3"
}
}
resource "azurerm_app_service" "container_service" {
name = "${var.builderName}"
location = "${azurerm_resource_group.rg.location}"
resource_group_name = "${azurerm_resource_group.rg.name}"
app_service_plan_id = "${azurerm_app_service_plan.container_service_plan.id}"
tags = "${local.commonTags}"
app_settings = {
"DOCKER_REGISTRY_SERVER_URL" = "https://privateazurecontainerregistry.azurecr.io",
"DOCKER_REGISTRY_SERVER_USERNAME" = "privateazurecontainerregistry_username",
"DOCKER_REGISTRY_SERVER_PASSWORD" = "privateazurecontainerregistry_pw",
"CONTAINER_MEMORY:" = 8000
}
site_config {
windows_fx_version = "DOCKER|privateazurecontainerregistry.azurecr.io/app.1901:latest"
}
}
我得到的错误如下:
并且:
要点: