【发布时间】:2020-06-14 13:32:19
【问题描述】:
我正在尝试配置存储帐户,但运行它会导致错误:
Error: Error reading static website for AzureRM Storage Account "sa12345461234512name":
accounts.Client#GetServiceProperties:
Failure responding to request: StatusCode=403 -- Original Error: autorest/azure:
Service returned an error. Status=403 Code="AuthorizationPermissionMismatch"
Message="This request is not authorized to perform this operation using this permission.\n
RequestId:05930d46-301e-00ac-6d72-f021f0000000\n
Time:2020-03-02T09:09:44.9417598Z"
运行操作系统 Windows 10 专业版。
复制步骤(在安装了 Azure CLI 的 Powershell 中)
- az 登录
- mkdir 虚拟文件夹
- cd 虚拟文件夹
- 创建 config.tf
- 地形初始化
- 地形规划
- terraform apply -auto-approve
Config.tf 内容
# Configure the Azure Provider
provider "azurerm" {
version = "=2.0.0"
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "Australia East"
}
resource "azurerm_storage_account" "example" {
name = "sa12345461234512name"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "LRS"
tags = {
environment = "staging"
}
}
不确定我缺少什么,所有其他资源都可以正常工作,只是存储帐户。
【问题讨论】:
-
这看起来好像缺少权限?您对订阅的权限是什么?
-
我没有对订阅应用任何权限,所以无论默认设置是什么,我都在使用它。它建议我是订阅的管理员
标签: azure terraform terraform-provider-azure