【发布时间】:2020-12-17 17:12:24
【问题描述】:
我有在 DynamoDB 中保持锁的 terraform 堆栈:
terraform {
backend "s3" {
bucket = "bucketname"
key = "my_key"
encrypt = "true"
role_arn = "arn:aws:iam::11111111:role/my_role"
dynamodb_table = "tf-remote-state-lock"
}
}
当我运行 terraform workspace new test 时,它会失败并出现(相当误导的)错误:
failed to lock s3 state: 2 errors occurred:
* ResourceNotFoundException: Requested resource not found
* ResourceNotFoundException: Requested resource not found
如果我打开TF_LOG=DEBUG,那么我会看到400 Bad Request(更多详情on pastebin)
我做错了什么以及如何解决?
【问题讨论】:
-
您的帐户中是否存在该表?该角色可以访问它吗?
-
绝对是,是的。
标签: amazon-dynamodb terraform terraform-provider-aws