小编Fel*_*olz的帖子

Terraform CLI 出现错误:ID 缺少“slots”元素

我在 Windows 上执行terraform.exe apply并收到错误:

\n
azurerm_subnet.subnet: Refreshing state... [id=<...>]\nazurerm_app_service_plan.service_plan: Refreshing state... [id=<...>]\nazurerm_app_service.app: Refreshing state... [id=<...>]\nazurerm_app_service_virtual_network_swift_connection.test: Refreshing state... [id=<...>]\nazurerm_app_service_slot.production: Refreshing state... [id=<...>]\nazurerm_app_service_slot.staging: Refreshing state... [id=<...>]\n\nError: ID was missing the `slots` element\n
Run Code Online (Sandbox Code Playgroud)\n

我正在尝试使用 terraform 构建具有不同插槽和 docker 图像的 Azure WebApp。它应该根据 Dockerfile 映像部署具有不同插槽的 Azure WebApp。

\n

第一次运行没有错误。当我刷新资源时收到错误消息。

\n

我正在使用 azurerm 提供程序版本 2.1.0 和 azurerm 后端。

\n

请参阅以下 terraform 文件:

\n
terraform {\n  backend "azurerm" {\n    resource_group_name  = "..."\n    storage_account_name = "..."\n    container_name       = "..."\n    key                  = "..."\n\n    subscription_id      = "..."\n    tenant_id …
Run Code Online (Sandbox Code Playgroud)

runtime-error azure terraform azure-web-app-service terraform-provider-azure

8
推荐指数
1
解决办法
4653
查看次数