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

Feature: Conditionally Enable Ingress to spoke-vpc via org-vpc-share #28

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sudosoul
Copy link

@sudosoul sudosoul commented May 6, 2023

Issue #, if available: #27

Description of changes:
The current solution does not easily enable Ingress to spoke accounts. Although it is possible by creating additional TF stacks to deploy - for example - ALBs in the Network-Hub account which forward to IP-based Target Groups in a Spoke account, I feel this makes IaC management & organization more difficult.

It is my opinion that this solution should also be responsible for allowing Ingress to Spoke accounts, via a single example-spoke-vpc deployment, which I feel is helpful when provisioning new sub-accounts.

This PR does just that, by creating a RAM resource share org-vpc-share from the Network-Hub account that shares the inspection_vpc's public subnets. New spoke-vpc deployments have the option of joining this org-vpc-share by enabling an Input Flag enable_ingress. If enabled, the spoke-vpc module joins the VPC share, seamlessly allowing spoke-account resources like an ALB to deploy into the public subnets shared by the org-vpc-share.

For me, it just makes sense to have this feature managed by these network-hub and network-spoke modules, rather than having to deploy additional cross-account stacks with cross-account dependencies. This is a one-time action managed by the same deployment responsible for provisioning spoke-vpcs.

This feature is backwards-compatible with the current version. While now the org-vpc-share is created by default, new subaccounts / spoke-vpc's do not join the resource share by default unless the enable_ingress input is explicitly set to true.

Please let me know your thoughts on this, and feel free to suggest changes (especially to the new names used).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sudosoul
Copy link
Author

I guess this really isn't needed. One could just - in there spoke-account app tf stack - create an ALB resource by assuming role into the network-hub account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant