-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform unable to delete the AWS routing table association #20216
Comments
We also sometimes get this error but it seems transient (aka it is not always occurring). In our case: |
May be changing the following code into
would fix the issue |
I remember fixing similar issue for placement_group issue #9915 with PR #11671 |
This functionality has been released in v3.51.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
here is the exact error :
Error: error waiting for Route Table Association (rtbassoc-063*) delete: unexpected state 'associated', wanted target ''. last error: %!s()**
note : The VPC and routing table everything created through TF and used "wait" to 2ms to de associate the dependency. But its kind of intermittent issue.
hashicorp/aws v3.50.0 - is the version
and we use TF 0.15 version.
here is the Creation of route table assiciations
######################################################################
-------------- Creating Route Tables Associations ------------------
######################################################################
resource "time_sleep" "wait" {
depends_on = [aws_route_table.prv1_rt,aws_route_table.prv2_rt,aws_route_table.public_rt]
destroy_duration = "2m"
}
Frontend AZ A
resource "aws_route_table_association" "fe_subnet_1_association" {
route_table_id = aws_route_table.prv1_rt.id
subnet_id = aws_subnet.module_frontend_subnet_1.id
depends_on = [time_sleep.wait]
}
Frontend AZ B
resource "aws_route_table_association" "fe_subnet_2_association" {
route_table_id = aws_route_table.prv2_rt.id
subnet_id = aws_subnet.module_frontend_subnet_2.id
depends_on = [time_sleep.wait]
}
#Backend AZ A
resource "aws_route_table_association" "be_subnet_1_association" {
route_table_id = aws_route_table.prv1_rt.id
subnet_id = aws_subnet.module_backend_subnet_1.id
depends_on = [time_sleep.wait]
}
#Backend AZ B
resource "aws_route_table_association" "be_subnet_2_association" {
route_table_id = aws_route_table.prv2_rt.id
subnet_id = aws_subnet.module_backend_subnet_2.id
depends_on = [time_sleep.wait]
}
Public
resource "aws_route_table_association" "public_subnet_1_association" {
route_table_id = aws_route_table.public_rt.id
subnet_id = aws_subnet.module_public_subnet_1.id
depends_on = [time_sleep.wait]
}
Public
resource "aws_route_table_association" "public_subnet_2_association" {
route_table_id = aws_route_table.public_rt.id
subnet_id = aws_subnet.module_public_subnet_2.id
depends_on = [time_sleep.wait]
}
The text was updated successfully, but these errors were encountered: