-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/openstack: Toggle Creation of Default Security Group Rules #12119
provider/openstack: Toggle Creation of Default Security Group Rules #12119
Conversation
This commit modifies the behavior implemented in hashicorp#9799 by enabling the user to be able to toggle the creation of the default security group rules.
@jtopjian I see that you are using boolean value for |
@Kiemes Booleans can be used. :) In the variable documentation you referenced, check out the section that reads:
In this case, the following works just fine: variable "ddr" {
default = true
}
resource "openstack_networking_secgroup_v2" "test" {
name = "test"
description = "test"
delete_default_rules = "${var.ddr}"
} You can test this out with any other parameter that is currently of type boolean, of which there are currently 25 in the OpenStack provider (not counting this new one). However, I would imagine you will want to just omit |
@jtopjian Thanks for the explanation. I actually expected you to do the right thing :) And I have to admit that I did not read the whole page. And yes, we are going to use the default value |
LGTM :) |
@stack72 Thank you! |
…ashicorp#12119) This commit modifies the behavior implemented in hashicorp#9799 by enabling the user to be able to toggle the creation of the default security group rules.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This commit modifies the behavior implemented in #9799 by enabling
the user to be able to toggle the creation of the default security
group rules.
Fixes #12102
non-commit note: This effectively changes the behavior introduced in #9799 to be opt-in instead of dictated, which I agree is a better solution. I tried to make the new argument intuitive as well as provide documentation about how to recreate the default rules. Caveats are mentioned for OpenStack environments that have deviated from the default behavior.
Between #9799 and now, there will be three sets of
openstack_networking_secgroup_v2
's in the wild, however, no changes should happen to existing deployments since there is not a default value specified and an explicit value oftrue
must be given for the rules to be deleted.In addition, no destructive behavior is expected (and by destructive, I mean the loss of data and stateful services). If someone chooses to add this argument with a value of
true
orfalse
to their configuration, then the security group and the rules connected to it will be recreated. All resources that consume security groups are able to handle security group updates without being destroyed. If such a thing happens, it is a bug and should be reported.