terraform-aws-vpc icon indicating copy to clipboard operation
terraform-aws-vpc copied to clipboard

Subnets-only deployment to existing VPC

Open psantus opened this issue 1 year ago β€’ 2 comments

Is your request related to a problem? Please describe.

I want to be able to instantiate multiple instances of this module, in order to provide a shared VPC with account-specific subnets.

  • Instance A would provide VPC and Gateways
  • Instance B, C, D... would provide subnets for test, prep, prod... with their NACL, Route tables, etc. and would rely on Instance A for VPC-level resources.

Describe the solution you'd like.

Add several variables

subnets_only            = true
vpc_id                  = module.instance_a.vpc_id
egress_only_gateway_id  = module.instance_a.egress_only_internet_gateway_id
aws_internet_gateway_id = module.instance_a.igw_id
nat_gateway_ids         = module.instance_a.natgw_ids

Use those IDs with data instead of creating new vcc-level resources.

Describe alternatives you've considered.

Additional context

psantus avatar Jan 23 '24 10:01 psantus

This is required in organizations where other teams / central teams are providing the VPCs and the corresponding CIDR ranges, too.

Lock128 avatar Feb 08 '24 21:02 Lock128

@antonbabenko @bryantbiggs : would you consider reviewing my PR, if I submit one on this?

psantus avatar Feb 09 '24 10:02 psantus

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[bot] avatar Mar 11 '24 00:03 github-actions[bot]

This issue was automatically closed because of stale in 10 days

github-actions[bot] avatar Mar 22 '24 00:03 github-actions[bot]

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[bot] avatar Apr 21 '24 02:04 github-actions[bot]