gpt4 book ai didi

azure - Terraform 后端到 azure blob 存储错误

转载 作者:行者123 更新时间:2023-12-01 01:43:31 24 4
gpt4 key购买 nike

我一直在使用下面的内容成功地为 Azure 存储中的 terraform 创建后端状态文件,但由于某种原因它停止工作。我已经回收了存储的密码,尝试了两个 key ,但每次都得到相同的错误

后端.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
Initializing the backend...
Successfully configured the backend "azurerm"! Terraform will automatically use this backend unless the backend configuration changes.
Error refreshing state: storage: service returned error: StatusCode=403, ErrorCode=AuthenticationFailed, ErrorMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:665e0067-b01e-007a-6084-97da67000000
Time:2018-12-19T10:18:18.7148241Z, RequestInitiated=Wed, 19 Dec 2018 10:18:18 GMT, RequestId=665e0067-b01e-007a-6084-97da67000000, API Version=, QueryParameterName=, QueryParameterValue=

你知道我做错了什么吗?

最佳答案

对我有用的是删除本地 .terraform 文件夹并重试。

关于azure - Terraform 后端到 azure blob 存储错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53849179/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com