-
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: Change rules type to List #7194
Conversation
Allows for ordering of rules that are applied to the firewall policy, including addition and removal of rules in certain positions.
Hi @scrossan! This change looks good to me in principle - does it give a reasonable looking diff for those migrating from the previous format? |
Hi @jen20 - I believe it does. If we expand the example in #7172 to include 11 firewall rules and apply that with the current release, Terraform plans the following when it is rebuilt with this change:
It lists the rules alphabetically rather than numerically, but now wants to order the rules as they are specified in the array of For our own configuration, with 144 rules that have seemingly so far have been applied in no particular order, Terraform wants to do the same as it does above: order the rules as they are ordered in the array of |
This is probably unavoidable, but I think as long as it's detailed in the CHANGELOG, it should be sufficient. To confirm: the old method of ordering was alphabetical by ID and now the ordering is position in the list?
Indeed. I dug through the Neutron code last night and confirmed that firewall rules are applied as an array/list in order of element (Firewall rules are passed into the policy on the command-line by a space-separated string. The string is then split by whitespace and applied). Are you able to run the fwaas acceptance tests and see if everything still passes? If so, I'm good with having this merged. If you aren't able to run them, I will be able to in the next day or so. |
In the diff ordering is still alphabetical (as above), but as for how the rules are actually applied - with this change - it's now based on position in the list, whereas before it does look like it was alphabetical by ID although I'm not certain about that. Regarding the acceptance tests, I ran the following command which completed successfully: make testacc TEST=./builtin/providers/openstack TESTARGS='-run=TestAccFW' Just wanted to double check that I ran the correct tests before claiming that they were passing successfully! |
@scrossan Thank you for your work on this! I just reviewed and tested everything and I think it's good to go! |
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. |
Allows for ordering of rules that are applied to the firewall policy,
including addition and removal of rules in certain positions.
Fixes #7172.