cloudposse / terraform-aws-dynamic-subnets

Terraform module for public and private subnets provisioning in existing VPC
https://cloudposse.com/accelerate
Apache License 2.0
191 stars 165 forks source link

Create public subnets only when `public_subnets_enabled` is `true` #163

Closed triThirty closed 2 years ago

triThirty commented 2 years ago

what

To check if create public subnet when set public_subnets_enabled false

why

Currently, when set set public_subnets_enabled false, module still creates public subnet, according to the logic of creating private subnet, there should be a check if public_subnets_enabled is false, not creating public subnet.

references

Slack thread: https://sweetops.slack.com/archives/CCT1E7JJY/p1652862041154429

nitrocode commented 2 years ago

/test all

nitrocode commented 2 years ago

Ah it looks like a PR was already created for this. Thank you for the contribution anyway @triThirty .

https://github.com/cloudposse/terraform-aws-dynamic-subnets/pull/162

nitrocode commented 2 years ago

Actually, on second thought, I don't see the same fix applied in the other PR.

nitrocode commented 2 years ago

I changed to no-release since https://github.com/cloudposse/terraform-aws-dynamic-subnets/pull/162 is most likely going to be merged soon enough. This way we can combine the two PRs in a single release.