-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Safer security group settings #93
Safer security group settings #93
Conversation
Specify a name_prefix, rather than name. Ignore changes in the security group's name for backwards compatibility.
This will help reduce downtime as a result in SG changes.
@alexjurkiewicz typically we don't use |
Thanks for the feedback. Just making sure I'm clear: you are saying it's not a bug if the module fails while re-creating resources if the context is unchanged? |
@alexjurkiewicz hm, putting it that way makes me re-think this. I might be being overly biased here -- I'll bring it up with the contributor team and get others thoughts. |
I use this module a lot to create and destroy cluster and clones. could @alexjurkiewicz please expand on the cases you have seen this? and maybe paste and output? I'm interested in reproducing it. Thanks. |
I created this module with the following context:
namespace = "myapp"
stage = "prd"
name = "auth"
It created a security group called "myapp-prd-auth". I thought that name
was a little generic, so I changed name => name_prefix. I could have also
added a hardcoded suffix of "-rds" but decided not to.
I then added create_before_destroy because IMO it is better default
behaviour for security groups.
…On Fri, 4 Dec 2020 at 15:40, PePe Amengual ***@***.***> wrote:
I use this module a lot to create and destroy cluster and clones.
recreating has always the problem of conflicts depending if the destroy
plan happen to be in the order that was supposed to be, although this
happened mostly in the early days I do not see it very often but as like
@Gowiem <https://github.com/Gowiem> said using the label module is very
easy to customize a name enough that you will not have a conflict.
could @alexjurkiewicz <https://github.com/alexjurkiewicz> please expand
on the cases you have seen this? and maybe paste and output? I'm interested
in reproducing it.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC4U5KV6RXNVCJKUSG3PLLSTBR3JANCNFSM4UKCFE4Q>
.
|
I think the https://github.com/cloudposse/terraform-null-label gives enough flexibility to solve this problem, if you did not like the name then you could have added an attribute or something to change it to make it look like you wanted. |
@alexjurkiewicz The idea of the naming scheme is that you specify enough information so that you can recognize the component being referenced from the generated It is true that deleting security groups (or even worse, VPCs) can take a long time or fail completely. That is more of a consequence of what is in them than how they are named. If there is a genuine issue of things not being created or deleted in the correct order, we should fix that using That said, I'm not opposed to using |
Why not support both
|
Thanks for the feedback all.
You are right, I think we can't break backwards compatibility with this change. That's why I added a |
The problem is that the introduction of the |
Dang. I never realised that. I looked into alternate solutions here but couldn't find any. Thanks for your feedback. |
what
why
references