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

Support (and document) use case for using existing Transit Gateway #75

Closed
korenyoni opened this issue May 30, 2022 · 3 comments
Closed

Comments

@korenyoni
Copy link

korenyoni commented May 30, 2022

Is your request related to a new offering from AWS?

No.

Is your request related to a problem? Please describe.

var.create_tgw short-circuits creation of aws_ec2_transit_gateway_route and prevents using this module when a TGW already exists but the TGW routes should be created:

# List of maps with key and route values
vpc_attachments_with_routes = chunklist(flatten([
for k, v in var.vpc_attachments : setproduct([{ key = k }], v.tgw_routes) if var.create_tgw && can(v.tgw_routes)
]), 2)

This use case is relevant when the Transit Gateway is managed in one configuration / state, but the VPC attachments and their routes are managed elsewhere.

It is not clear if this use case is actually intended to be supported, hence why this issue is a feature request and not a bug report. For example, aws_ec2_transit_gateway_vpc_attachment is created even when var.create_tgw, but as mentioned above, aws_ec2_transit_gateway_route is not. Moreover, this use case is not documented.

transit_gateway_id = var.create_tgw ? aws_ec2_transit_gateway.this[0].id : each.value.tgw_id

Describe the solution you'd like.

Change this logic such that aws_ec2_transit_gateway_route when var.create_tgw is false

Describe alternatives you've considered.

None

Additional context

@korenyoni korenyoni changed the title Support use case for using existing Transit Gateway Support (and document) use case for using existing Transit Gateway May 30, 2022
@github-actions
Copy link

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

@github-actions github-actions bot added the stale label Jun 30, 2022
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions
Copy link

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 Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant