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

Multiple public subnets provisioning

Open pielu opened this issue 1 year ago • 2 comments

Hello,

There seem to be no way to provision multiple public subnets. This functionality is useful for many use cases, having security (firewall) subnets being one of them. The public subnet code technically iterates over public subnet(s) but it's iterating keys and public is protected key and cannot be used more than once.

pielu avatar Jun 14 '23 17:06 pielu

Hi! thanks for opening this issue! you are correct that we lock down the module to only define 1 set of public subnets using protected keys. ATM we do not have any intention of allowing additional public subnet definitions.

However, I believe the use case you mentioned is one we have considered and planned for using our network firewall module. Here is an example: https://github.com/aws-ia/terraform-aws-networkfirewall/blob/main/examples/central_inspection_with_egress/main.tf

Please let me know if you think that will solve the use case you mentioned!

drewmullen avatar Jun 20 '23 15:06 drewmullen

Hi! Thanks for coming back so quickly. Yes I have looked at it and in the central firewall architecture that would work. I had a feeling implementing multiple public subnets right now would be a rather ordeal and quite a refactor to the module itself. I have worked around this in my wrapper module, no problem. Just wanted to signal a use case that might be somewhat of a niche. Again, thank you for considering it.

pielu avatar Jun 22 '23 17:06 pielu