cloudposse / terraform-aws-dynamic-subnets

Terraform module for public and private subnets provisioning in existing VPC
https://cloudposse.com/accelerate
Apache License 2.0
191 stars 165 forks source link

Errors in module on urelated terraform import statement #145

Closed aholbreich closed 2 years ago

aholbreich commented 2 years ago

Describe the Bug

I get errors like this:

╷
│ Error: Invalid resource instance data in state
│ 
│   on .terraform/modules/subnets/public.tf line 46:
│   46: resource "aws_route_table" "public" {
│ 
│ Instance module.subnets.aws_route_table.public[0] data could not be decoded from the state: unsupported attribute "timeouts".

on something unrelated like:

terraform import kubernetes_cluster_role.cluster_admin admin

Expected Behavior

No error thrown on unrelated imports

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

nitrocode commented 2 years ago

@aholbreich what version of the aws provider are you using ? try doing a terraform init -upgrade to use the latest aws provider.

Looks like timeouts were added in 3.62.0

https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#3620-october-08-2021

resource/aws_route_table: Add custom timeouts block (#21161)

nitrocode commented 2 years ago

@aholbreich try upgrading to https://github.com/cloudposse/terraform-aws-dynamic-subnets/releases/tag/0.39.8 and you should no longer see this issue