-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Create public subnets only when public_subnets_enabled
is true
#163
Create public subnets only when public_subnets_enabled
is true
#163
Conversation
@@ -12,7 +12,7 @@ module "public_label" { | |||
} | |||
|
|||
resource "aws_subnet" "public" { | |||
count = local.subnet_az_count | |||
count = local.public_enabled ? local.subnet_az_count : 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is private also impacted by this ?
cc: @Nuru
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the private, I think you mean private subnet creation? Private is controled by private_enabled.
/test all |
public_subnets_enabled
is true
Ah it looks like a PR was already created for this. Thank you for the contribution anyway @triThirty . |
Actually, on second thought, I don't see the same fix applied in the other PR. |
I changed to no-release since #162 is most likely going to be merged soon enough. This way we can combine the two PRs in a single release. |
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