-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
EC2 Transit Gateway attachment associations cannot be non-default #6664
Comments
The initial acceptance testing was written with only one of the two flags disabled at a time. I'm able to reproduce the error when both are disabled:
I'll work on a fix shortly. |
Fix pull request submitted: #6665 A workaround for this specific error until the above fix is released is to leave one of the |
I experienced a similar issue where I am creating an |
@amall015 thanks for the heads up. Could you please create a separate issue for that one? Multi account setup was not available during the beta so there are likely some additional rough edges with that support as it’s not tested as well. I’d imagine we might introduce a fix there to ignore that error. |
The fix for the original issue has been merged and will release with version 1.51.0 of the AWS provider, likely in the next day or two. 👍 |
This has been released in version 1.51.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
@bflad i'm still getting the first original issue. I'm running
|
Tried also with AWS Provider Are we sure this has been fixed? Can somebody confirm please? |
Tried also with AWS Provider |
For anyone else encountering this, see the complete solution in #7220. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Core: 0.11.10
AWS Provider: 1.50.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
I know you don't like debug pastes.. but it's short enough.
Expected Behavior
EC2 Transit Gateway VPC Attachment should be created without error.
Actual Behavior
If either a Transit Gateway Route Table Association or Transit Gateway Route Table Propagation is not defined for the EC2 Transit Gateway VPC Attachment, after the Attachment resource is created, terraform attempts to confirm creation success by describing the Attachment resource and its properties. This describe step fails because terraform tries to describe a route table association and or propagation that does not exist and then exits on failure; despite neither of these properties being required.
Despite the exit, the Attachment resource remains successfully created as the Create API call succeeded, only the subsequent describe fails.
Steps to Reproduce
terraform apply
Important Factoids
If you work around this issue by allowing the EC2 Transit Gateway to associate VPC Attachments with a default route table and/or propagation, then the attachment can be successfully created and terraform can successfully describe the Attachment resource and move on.
However if you do this you cannot then use aws_ec2_transit_gateway_route_table_association and aws_ec2_transit_gateway_route_table_propagation resources because these things are already defined for the Attachment and the API call to associate them does not allow for automatic replacement.
As a result, these resources currently cannot be used as either defaults are used, and so they cannot be used; or the attachment creation fails, and terraform exits before they can be applied.
References
#6605
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetTransitGatewayRouteTableAssociations.html
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetTransitGatewayRouteTablePropagations.html
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayVpcAttachments.html
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTransitGatewayVpcAttachment.html
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateTransitGatewayRouteTable.html
The text was updated successfully, but these errors were encountered: