Skip to content
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

position_keyword and/or position_reference not respecting lifecycle, ignore_changes #453

Open
jschelfh-be opened this issue Dec 23, 2024 · 0 comments
Labels

Comments

@jschelfh-be
Copy link

jschelfh-be commented Dec 23, 2024

Describe the bug

We use position_keyword and position_reference on resource panos_panorama_security_rule_group to put new rules just before the cleanup-rule at the bottom, I will refer to this as rule_A. Over time as new rules are created the position of rule-A will change.
Whenever rule_A is updated, it will be repositioned just before the cleanup-rule, although we explicitly set:

lifecycle {
create_before_destroy = true
ignore_changes = [
position_keyword,
position_reference
]
}

Expected behavior

Ignore changes on the position_keyword and position_reference made outside terraform (or as a consequence of other rules being created)

Current behavior

Rule is updated and re-positioned - this is unnecessary and also avoids that you can place frequently hit rules at the top (manually)

Possible solution

respect lifecycle, ignore_changes

Steps to reproduce

  1. create rule rule_A, with a clear position (for example bottom)
  2. create rule rule_B, with the same position (bottom), now rule_B will be below rule_A
  3. update rule_A, make sure your code has the lifcycle set as shown above to ignore position_reference, position_keyword.
  4. You will see that the order of the rules has changed: rule_A is below rule_B

Screenshots

NA

Context

  1. unnecessary re-positioning
  2. unable to change rule order manually

Your Environment

panos 1.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant