azure - Terraform 后端到 azure blob 存储错误
问题描述
我一直在使用以下内容在 Azure 存储中成功创建 terraform 的后端状态文件,但由于某种原因它停止工作。我已经回收了存储密码,尝试了两个密钥并且每次都得到相同的错误
后端.tf
terraform {
backend "azurerm" {
storage_account_name = "terraformstorage"
resource_group_name = "automation"
container_name = "terraform"
key = "testautomation.terraform.tfstate"
access_key = "<storage key>"
}
}
返回错误
terraform init
正在初始化后端...
成功配置后端“azurerm”!除非后端配置发生更改,否则 Terraform 将自动使用此后端。
刷新状态时出错:存储:服务返回错误:StatusCode=403,ErrorCode=AuthenticationFailed,ErrorMessage=Server 未能对请求进行身份验证。确保 Authorization 标头的值正确形成,包括签名。RequestId:665e0067-b01e-007a-6084-97da67000000
时间:2018-12-19T10:18:18.7148241Z,RequestInitiated=周三,2018 年 12 月 19 日 10:18:18 GMT,RequestId=665e0067-b01e-067000-60804-7 API 版本=,QueryParameterName=,QueryParameterValue=
任何想法我做错了什么?
解决方案
对我有用的是删除本地 .terraform 文件夹并重试。
推荐阅读
- docker - docker-compose 中的快速 api 和 nginx 在连接到上游时显示 connect() 失败(111:连接被拒绝),客户端:172.27.0.1,服务器:
- c# - Linux 中的 SSL 验证失败
- ios - 在单元测试期间如何模拟默认时区?
- amazon-web-services - AWS CLI“aws elasticbeanstalk update-environment”调用需要参数
- python - 带有内核的 SVM 算法中的权重数
- flutter - 初始化 Flutter-Fire Flutter Web
- nginx - Nginx:为子路径提供静态文件
- java - 使用 iText 创建的损坏的 PDF(0 字节)
- css - React 中的单选按钮选择
- css - CSS3 中的占位符(输入)点击效果