【发布时间】:2018-08-01 15:08:04
【问题描述】:
我正在尝试使用 terraform 添加简单的 A 记录,但遇到“访问被拒绝错误:
* aws_route53_record.dns_name: AccessDenied: User: arn:aws:iam::<#>:user/<username> is not authorized to access this resource
status code: 403, request id: <hash>
基于此链接,我不应该在我的文件中定义“提供者 aws”。 我没有使用提供者,她是我的代码:
resource "aws_route53_record" "new_dns_name" {
zone_id = "${var.dns_zone_id}"
name = "${lookup(var.dns_name, var.region)}"
type = "A"
alias = {
name = "${lower(aws_elb.elb_https.dns_name)}"
zone_id = "${aws_elb.elb_https.zone_id}"
evaluate_target_health = false
}
}
我用 terraform 0.8.4 和 0.11.3 进行了尝试。
与 cli 键关联的用户具有以下策略,但由于某种原因无法正常工作:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
我在这里做错了什么? 谢谢
【问题讨论】:
-
这个错误是关于你账户的权限,没有人可以帮忙。因此,请先使用适当的权限修复您的 aws 访问密钥。
标签: amazon-web-services terraform amazon-route53