简体   繁体   English

在Terraform中创建接口类型VPC端点时出错(AWS提供程序)

[英]Error while creating interface type vpc endpoint in terraform (aws provider)

I am trying to create an interface type kms endpoint in terraform on aws. 我正在尝试在AWS上的Terraform中创建接口类型kms端点。 While doing so, I get the following error - 这样做时,出现以下错误-

Error creating VPC Endpoint: InvalidParameter: Subnet: subnet- does not have corresponding zone in the service com.amazonaws.ap-southeast-1.kms 创建VPC端点时出错:InvalidParameter:子网:subnet-服务com.amazonaws.ap-southeast-1.kms中没有相应的区域

My endpoint resource looks like -- 我的端点资源看起来像-

    resource "aws_vpc_endpoint" "kms" {
  vpc_id            = "${aws_vpc.main.id}"
  service_name      = "com.amazonaws.${var.aws_region}.kms"
  vpc_endpoint_type = "Interface"

  subnet_ids = [
<my subnet ids>
  ]

  security_group_ids = [ <my sg ids> ]
  private_dns_enabled = true
} 

Anyone any clue on what I might be missing. 任何人关于我可能会缺少的线索。 Just FYI -- I haven't added any route53 record for kms. 仅供参考-我没有为kms添加任何route53记录。 Do i need to? 我需要吗?

Looking forward to any replies. 期待任何答复。

Thanks Avi 谢谢阿维

If you have not created the private DNS in Route53, set private_dns_enabled=false . 如果尚未在Route53中创建专用DNS,请设置private_dns_enabled = false Otherwise create the private zone first. 否则,首先创建专用区域。

我通过为不同子网创建多个终结点资源来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS CDK:使用 VPC 接口端点创建 API 网关时出现异常 - AWS CDK : Exception while creating API Gateway with VPC Interface Endpoint 应用 terraform 计划在 AWS 中创建 VPC 终端节点时出错 - Error applying terraform plan to create VPC endpoint in AWS 带有 Terraform 的 S3 的 AWS VPC 终端节点 - 错误:多个 VPC 终端节点服务匹配 - AWS VPC Endpoint for S3 with Terraform - Error: multiple VPC Endpoint Services matched 运行 TF 导入时出现错误 AWS Terraform VPC 对等互连 - Error AWS Terraform VPC Peering while running TF Import 为什么使用 Terraform 创建存储桶会抛出“提供者 provider.aws 不支持资源类型“aws_s3””错误? - Why does creating a bucket with Terraform throw "The provider provider.aws does not support resource type "aws_s3"" error? AWS:私有子网的 VPC 接口终端节点 - AWS: VPC interface endpoint for private subnets 可以在对等 vpc 中调用 aws 接口端点吗? - Possible to call the aws interface endpoint in a peered vpc? 在 Cloud Formation 中为 SQS 创建 VPC 接口端点 - Creating a VPC Interface Endpoint for SQS in Cloud Formation AWS 如何将 VPC 接口终端节点关联到另一个 VPC 中的特定 NLB - AWS How to associate a VPC interface endpoint to a specific NLB in another VPC Terraform 创建 AWS Cognito 用户池时出错 - Terraform Error while creating AWS Cognito Userpool
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM