Skip to content

fix: Update routes when doing a vpc attachment #83

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

Closed

Conversation

velkovb
Copy link

@velkovb velkovb commented Aug 4, 2022

Description

The VPC attachment block supports adding routes to an existing route table but that only works when you are creating a transit gateway. When you are just attaching a VPC to a shared gateway it doesn't work as it only looks at the Id of the internal resource.

Motivation and Context

This change would allow to update route tables when attaching VPCs to a shared transit gateway by taking parsing the tgw_id attribute as well. Logic is replicated from the aws_ec2_transit_gateway_vpc_attachment resource.

Breaking Changes

Not a breaking change.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s).
  • I have tested and validated these changes using one or more of the provided examples/* projects. It was tested with similar implementation to the multi-account setup.
  • I have executed pre-commit run -a on my pull request

@velkovb velkovb changed the title fix: update routes when doing a vpc attachment fix: Update routes when doing a vpc attachment Aug 4, 2022
@github-actions
Copy link

github-actions bot commented Sep 4, 2022

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 4, 2022
@velkovb
Copy link
Author

velkovb commented Sep 7, 2022

can we remove the stale label?

@github-actions github-actions bot removed the stale label Sep 8, 2022
@github-actions
Copy link

github-actions bot commented Oct 8, 2022

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Oct 8, 2022
@velkovb
Copy link
Author

velkovb commented Oct 10, 2022

can we remove the stale label?

@github-actions github-actions bot removed the stale label Oct 11, 2022
@obi-juan1971
Copy link

It would be great to have this fixed!!

Co-authored-by: Brian Murphey <[email protected]>
@github-actions
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Nov 27, 2022
@velkovb
Copy link
Author

velkovb commented Dec 2, 2022

This is still valid

@github-actions github-actions bot removed the stale label Dec 3, 2022
@velkovb velkovb requested a review from bmurphey December 21, 2022 14:21
Copy link

@bmurphey bmurphey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how much my approval means in the context of this community module, but this does look good to me and I've been using it successfully in my environment.

@mrobinson1022
Copy link

it would be super great if this PR could be merged, I tested it as well and it works flawlessly.

@velkovb
Copy link
Author

velkovb commented Jan 13, 2023

I can't request review of the PR. @antonbabenko could you help?

@github-actions
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Feb 13, 2023
@velkovb
Copy link
Author

velkovb commented Feb 13, 2023

/remove-lifecycle stale

@github-actions github-actions bot removed the stale label Feb 14, 2023
@bryantbiggs
Copy link
Member

can you update/provide an example that demonstrates/validates this change?

@bryantbiggs
Copy link
Member

and can we incorporate the changes in #102

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Apr 6, 2023
@velkovb
Copy link
Author

velkovb commented Apr 6, 2023

can you update/provide an example that demonstrates/validates this change?

I totally missed this. Yes, I will try to add an example.

@velkovb
Copy link
Author

velkovb commented Apr 6, 2023

@bryantbiggs I think that actually the multi-account example covers this scenario. The problem is that here: https://github.com/terraform-aws-modules/terraform-aws-transit-gateway/blob/master/main.tf#L117 we only cover the case when the attachment is created when the tgw is created as well. When we just do an attachment with create=false we can't pass the tgw_id. My PR just fixes that and when you pass tgw_id on attachment it will take it into account.

Here is the example - https://github.com/velkovb/terraform-aws-transit-gateway/blob/fix/vpc-attachment-routes/examples/multi-account/main.tf#L98. I think it should be broken with current implementation.

@github-actions github-actions bot removed the stale label Apr 7, 2023
@github-actions
Copy link

github-actions bot commented May 7, 2023

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label May 7, 2023
@github-actions
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this May 17, 2023
@velkovb
Copy link
Author

velkovb commented May 17, 2023

Can we re-open this PR?

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants