當我嘗試創建與現有VPC關聯的新託管私有區域時,Terraform似乎無法創建AWS私有託管Route53區域,並死於以下錯誤:Terraform無法創建AWS私有託管路由53區域
Error applying plan:
1 error(s) occurred:
aws_route53_zone.analytics: InvalidVPCId: The VPC: vpc-xxxxxxx you provided is not authorized to make the association.
status code: 400, request id: b411af23-0187-11e7-82e3-df8a3528194f
這是我的.tf文件:
provider "aws" {
region = "${var.region}"
profile = "${var.environment}"
}
variable "vpcid" {
default = "vpc-xxxxxx"
}
variable "region" {
default = "eu-west-1"
}
variable "environment" {
default = "dev"
}
resource "aws_route53_zone" "analytics" {
vpc_id = "${var.vpcid}"
name = "data.int.example.com"
}
我不知道如果錯誤指的是任一一個:
- VPC不知何故需要被授權與區域提前聯繫。
- 的AWS帳號運行terraform需要正確的IAM權限區域與VPC關聯
會有人有線索,我怎麼能進一步解決?
有什麼terraform版本?似乎你運行舊版本。 – BMW