Skip to content
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

aws_ec2_transit_gateway_vpc_attachment does not respect setting default route table options to false #21438

Closed
jooh-lee opened this issue Oct 21, 2021 · 7 comments · Fixed by #32821
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@jooh-lee
Copy link

jooh-lee commented Oct 21, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.6
aws provider v3.63.0

Affected Resource(s)

  • aws_ec2_transit_gateway_vpc_attachment

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

Assume you have 2 aws accounts and have a provider for each

resource "aws_vpc" "vpc" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_subnet" "subnet" {
  vpc_id     = aws_vpc.vpc.id
  cidr_block = "10.0.1.0/24"
}

resource "aws_ec2_transit_gateway" "gateway" {
  auto_accept_shared_attachments  = "disable"
  default_route_table_association = "disable"
  default_route_table_propagation = "disable"
}

resource "aws_ec2_transit_gateway_vpc_attachment" "attacher" {
  subnet_ids         = [aws_subnet.subnet.id]
  transit_gateway_id = aws_ec2_transit_gateway.gateway.id
  vpc_id             = aws_vpc.vpc.id

  transit_gateway_default_route_table_association = false
  transit_gateway_default_route_table_propagation = false
}

resource "aws_ec2_transit_gateway_vpc_attachment_accepter" "acceptor" {
  provider = aws.other_account

  transit_gateway_attachment_id                   = aws_ec2_transit_gateway_vpc_attachment.attacher.id
  transit_gateway_default_route_table_association = false
  transit_gateway_default_route_table_propagation = false
}

Debug Output

Panic Output

Expected Behavior

When transit_gateway_default_route_table_association and transit_gateway_default_route_table_propagation are set to false the state for those option should set to fase

Actual Behavior

The options are not respected and the tf state is kept as true. This in turn causes a perpetually dirty plan.

Steps to Reproduce

  1. create a aws_ec2_transit_gateway_vpc_attachment_accepter and aws_ec2_transit_gateway_vpc_attachment resource.
  2. On both resource set transit_gateway_default_route_table_association and transit_gateway_default_route_table_propagation to false
  3. Plan

Important Factoids

References

  • #0000
@jooh-lee jooh-lee changed the title aws_ec2_transit_gateway_vpc_attachment does not respect setting default route table options to false aws_ec2_transit_gateway_vpc_attachment_acceptor does not respect setting default route table options to false Oct 21, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Oct 21, 2021
@jooh-lee jooh-lee changed the title aws_ec2_transit_gateway_vpc_attachment_acceptor does not respect setting default route table options to false aws_ec2_transit_gateway_vpc_attachment does not respect setting default route table options to false Oct 21, 2021
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 22, 2021
@justinretzolk
Copy link
Member

Hey @jooh-lee 👋 Thank you for taking the time to file this issue! Can you update the issue description with the Terraform and AWS provider versions you're using so that we have all of the necessary information to attempt to reproduce this?

@jooh-lee
Copy link
Author

jooh-lee commented Nov 3, 2021

@justinretzolk description updated

@justinretzolk
Copy link
Member

Hey @jooh-lee 👋 Thank you for getting that updated. I've marked this as a bug so that we can take a look into this as soon as time allows.

@levenaux
Copy link

levenaux commented Nov 8, 2021

related #6670

@dkewley
Copy link

dkewley commented May 12, 2023

I hit this today with Terraform 1.4.6 and aws provider 4.67.0 -- the latest versions.

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This functionality has been released in v5.11.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!

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
4 participants