Terraform back-end to azure blob storage errors

喜夏-厌秋 提交于 2020-04-13 07:50:47

问题


I have been using the below to successfully create a back-end state file for terraform in Azure storage, but for some reason its stopped working. I've recycled passwords for the storage, trying both keys and get the same error every-time

backend.tf

    terraform {
    backend "azurerm" {
        storage_account_name    = "terraformstorage"
        resource_group_name     = "automation"
        container_name          = "terraform" 
        key                     = "testautomation.terraform.tfstate"
        access_key              = "<storage key>"
    }
}

Error returned

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=

Any ideas what im doing wrong?


回答1:


What worked for me is to delete the local .terraform folder and try again.



来源:https://stackoverflow.com/questions/53849179/terraform-back-end-to-azure-blob-storage-errors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!