Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: manage default security group #382
feat: manage default security group #382
Changes from 6 commits
2bb3bd0
3399914
2d1ee2a
ac1d3e5
99e8d19
5fbcb24
dca165a
510c568
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
if the default SG is set to be managed and the
default_security_group_name
left with no change to default value it creates a an emptyName
tag. its not a problem functionally but just FYI if you want to change this.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.
good point - maybe I add a check for a provided name value otherwise provide one like "default"
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.
ended up adding a default value of
default
for the variableThere 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.
Maybe defaults should be empty, because "When Terraform first adopts the Default Security Group, it immediately removes all ingress and egress rules in the Security Group." (from https://www.terraform.io/docs/providers/aws/r/default_security_group.html )
And, if I understand correctly, Terraform won't put original values back, if the user switches off
manage_default_security_group
afterwards.Previously, there were attempts to manage this resource in this module, but it was a bit too advanced for some use-cases and Terraform 0.11 which we had back then.
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.
good point - I think you're right, might be better to use
null
here as it seems to be the safest route usually