【问题标题】:Terraform route table association with VPC EndpointTerraform 路由表与 VPC 端点的关联
【发布时间】:2021-05-15 16:03:58
【问题描述】:

在将 vpc 端点与路由相关联时,我在使用 terraform(云)时遇到问题

VPC 端点

resource "aws_vpc_endpoint" "s3_endpoint_gateway" {
  vpc_id = aws_vpc.edcelvistacom_vpc.id
  service_name = "com.amazonaws.${var.region}.s3"
  tags = {
    "Name"    = "VPC Endpoint S3 - for Private Resources"
    "Project" = "edcelvistacom"
    "Env"     = "Production"
  }
}

路线关联

resource "aws_vpc_endpoint_route_table_association" "application" {
  count = length(var.availability_zones)

  route_table_id  = element(aws_route_table.application.*.id, count.index)
  vpc_endpoint_id = aws_vpc_endpoint.s3_endpoint_gateway.id
}

错误:

Error: Provider produced inconsistent result after apply

When applying changes to
module.networking.aws_vpc_endpoint_route_table_association.application[1],
provider "registry.terraform.io/hashicorp/aws" produced an unexpected new
value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

【问题讨论】:

  • 您的 aws 提供程序版本是什么?
  • Terraform v0.14.5 + 提供者 registry.terraform.io/hashicorp/aws v2.70.0 + 提供者 registry.terraform.io/hashicorp/template v2.2.0

标签: amazon-web-services terraform terraform-provider-aws


【解决方案1】:

aws 2.70 已经很老了。这个问题已经是reported on github 并且似乎是has been fixedaws 3.36 中。因此,我会尝试使用最新版本 3.40,如果错误仍然存​​在,则使用详细信息创建一个新的 github 问题。

【讨论】:

  • 使用 Terraform v0.14.5 + 提供者 registry.terraform.io/hashicorp/aws v3.40.0 + 提供者 registry.terraform.io/hashicorp/template v2.2.0 解决
猜你喜欢
  • 2017-07-15
  • 2020-08-31
  • 2021-11-01
  • 2021-06-16
  • 2021-02-25
  • 2019-01-21
  • 2020-05-06
  • 1970-01-01
  • 2019-01-15
相关资源
最近更新 更多