-
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
0.8.6 is not backwards compatible for OpenStack security groups #12102
Comments
This is correct. As discussed in #9799, this feature was requested by three users.
Just to make sure I'm understanding the problem described, you are running multiple versions of Terraform across a shared state / environment?
"backwards compatible", in this case, meant that existing infrastructure created with Terraform will continue to still work. Security Groups created with previous versions would have still had the default rules. New groups would need the rules explicitly created. Running older versions of Terraform on infrastructure created by newer versions of Terraform is not a scenario considered. It usually isn't.
This is certainly possible to do and the better approach to this problem. Thank you for suggesting it. |
+1 for the flag |
@jtopjian Thanks for the quick response. What failed for us is the following situation: Now we got an additional new OpenStack where we applied the same tf file but on our images, the CLI was updated to 0.8.6. This broke our CI which is running on the resources created with Terraform as the outgoing traffic was not allowed. That's why we added the two egress rules explicitly to the tf file. Executing Terraform on the new OpenStack worked again. But applying this modified tf file on the old, already existing OpenStacks, failed since it tried to create the two new egress rules as well. But of course they existed still from the first run. I hope this makes our situation which we ran into a bit more clear.
Can I deduct from your statement that you are going to put this on your backlog? |
@Kiemes Thank you for the clarification. I do sympathize with the issue you ran into and I apologize for that.
Yes, I'm currently working on it now. Just to make sure I don't run into a third case, I'm currently reviewing Neutron specs as well as Neutron drivers to fully understand the behavior of default 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. |
Version: >=0.8.6
Affected Resource(s)
openstack_networking_secgroup_v2
openstack_networking_secgroup_rule_v2
Terraform Configuration Files
Before 0.8.6 Terraform the default OpenStack behaviour was implemented. The created security group did contain two egress rules allowing all outgoing IPv4 and IPv6 traffic.
Executing the same script with >=0.8.6 creates an empty security group.
That means, you need to create two additional security group rules.
Executing this with >=0.8.6 creates again the expected security group with its rules.
Executing this with <0.8.6 breaks because the rules already exist.
Having a running system where the security group was created the old way, and running an update with the new version including the explicit egress rule fails.
It would be great, if the breaking change could be reverted since it is not backwards compatible as @jtopjian suggested.
Creating the security group entity is not breaking, but you need to introduce new egress rules which are breaking.
Alternatively to removing the change completely would be to introduce a flag in the security group resource. Without the flag, the sec group should still have the default egress rules. This would be backwards compatible. But people could specify the flag in order to get a "clean/empty/secure by default" security group as I guess this is what you wanted to achieve with the change.
Suggested example:
default of
empty
beingfalse
The text was updated successfully, but these errors were encountered: