1

I'm having an issue using terraform (cloud) when associating vpc endpoint to routes

VPC ENDPOINT

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" } } 

ROUTE ASSOCIATION

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:

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. 
2
  • What is your aws provider version? Commented May 15, 2021 at 7:51
  • Terraform v0.14.5 + provider registry.terraform.io/hashicorp/aws v2.70.0 + provider registry.terraform.io/hashicorp/template v2.2.0 Commented May 15, 2021 at 7:57

1 Answer 1

2

aws 2.70 is very old. This issue has been already reported on github and it seems it has been fixed in aws 3.36. Thus I would try with latest version 3.40 and if the error persists then make a new github issue with the details.

Sign up to request clarification or add additional context in comments.

1 Comment

Solved with Terraform v0.14.5 + provider registry.terraform.io/hashicorp/aws v3.40.0 + provider registry.terraform.io/hashicorp/template v2.2.0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.