Create: couldn't find resource (21 retries)

I am currently using Terrafom 1.0.2 to create AWS resources, however when applying the plans I getting errors saying resources cannot be found:

module.nyc_vpc.aws_main_route_table_association.nyc-shared-rt: Still creating... [2m10s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-3-rta: Still creating... [2m10s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-2-rta: Still creating... [2m20s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-1-rta: Still creating... [2m20s elapsed]
module.nyc_vpc.aws_main_route_table_association.nyc-shared-rt: Still creating... [2m20s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-3-rta: Still creating... [2m20s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-2-rta: Still creating... [2m30s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-1-rta: Still creating... [2m30s elapsed]
module.nyc_vpc.aws_main_route_table_association.nyc-shared-rt: Still creating... [2m30s elapsed]
module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-3-rta: Still creating... [2m30s elapsed]
╷
│ Error: error waiting for Main Route Table Association (rtbassoc-0c28cb0c028723065) create: couldn't find resource (21 retries)
│ 
│   with module.nyc_vpc.aws_main_route_table_association.nyc-shared-rt,
│   on network/nyc/01_shared.tf line 50, in resource "aws_main_route_table_association" "nyc-shared-rt":
│   50: resource "aws_main_route_table_association" "nyc-shared-rt" {
│ 
╵
╷
│ Error: error waiting for Route Table Association (rtbassoc-0df5b80d2f1192be8) create: couldn't find resource (21 retries)
│ 
│   with module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-1-rta,
│   on network/nyc/01_shared.tf line 86, in resource "aws_route_table_association" "nycaws-shared-use1-1-rta":
│   86: resource "aws_route_table_association" "nycaws-shared-use1-1-rta" {
│ 
╵
╷
│ Error: error waiting for Route Table Association (rtbassoc-0ab00690065ae8c90) create: couldn't find resource (21 retries)
│ 
│   with module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-2-rta,
│   on network/nyc/01_shared.tf line 100, in resource "aws_route_table_association" "nycaws-shared-use1-2-rta":
│  100: resource "aws_route_table_association" "nycaws-shared-use1-2-rta" {
│ 
╵
╷
│ Error: error waiting for Route Table Association (rtbassoc-0f9bd3e19539cfcb1) create: couldn't find resource (21 retries)
│ 
│   with module.nyc_vpc.aws_route_table_association.nycaws-shared-use1-3-rta,
│   on network/nyc/01_shared.tf line 113, in resource "aws_route_table_association" "nycaws-shared-use1-3-rta":
│  113: resource "aws_route_table_association" "nycaws-shared-use1-3-rta" {

Anyone else seeing this issue?

Attatch is the TF Plan I am using.
shared.txt (3.6 KB)

Facing similar issue:

Error: error waiting for Route Table Association (rtbassoc-0198ac3XXXXXXXXXc) create: couldn’t find resource (21 retries) 21:09:23 21:09:23 on modules/kg-subnets/main.tf line 58, in resource “aws_route_table_association” “private”: 21:09:23 58: resource “aws_route_table_association” “private” {

Also running into this, even though the rt association is present

Also running into this issue with TF 1.0.7 , did you find a solution @rgumti @HarpreetSinghBhola @jpke

Having the same Issue.

Error: ereading Main Route Table Association (rtbassoc-0a95e462ceb94daf0): empty resulte with module.route_table.aws_main_route_table_association.rt-association[6], on …/…/modules/route_table/main.tf line 65, in resource “aws_main_route_table_association” “rt-association”: resource “aws_main_route_table_association” “rt-association”

Yes this is still an issue for me. Using the latest terraform binary.

i was able to fix this by supplying an IAM

resource “aws_iam_role” “eb_ec2_role” {
name = “xxx-eb-ec2-role”
assume_role_policy = jsonencode({
Version = “2012-10-17”
Statement = [
{
Action = “sts:AssumeRole”
Effect = “Allow”
Principal = {
Service = “ec2.amazonaws.com
}
}
]
})
}

resource “aws_iam_instance_profile” “eb_instance_profile” {
name = “xxxx-eb-instance-profile”
role = aws_iam_role.eb_ec2_role.name
}

resource “aws_elastic_beanstalk_environment” “xxxx-api-env” {
name = “xxxx-api-env”
application = aws_elastic_beanstalk_application.xxxx-api.name
solution_stack_name = “64bit Amazon Linux 2023 v6.5.2 running Node.js 20”

setting {
namespace = “aws:autoscaling:launchconfiguration”
name = “IamInstanceProfile”
value = aws_iam_instance_profile.eb_instance_profile.name
}
}