You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Example Global Orchestrationresource"pagerduty_event_orchestration_global""global" {
set {
id ="ID1"
rule {
id ="RULEID1"
label ="RULELABEL1"
actions {}
condition{
expression ="CONDITION1"
}
}
rule {
id ="RULEID2"
label ="RULELABEL2"
actions {}
condition{
expression ="CONDITION2"
}
}
}
catch_all {
actions { }
}
}
Expected Behavior
When adding a new rule to the orchestration YAML file (e.g., a rule added after RULEID1), the Terraform plan should preserve the ordering of the rules as defined in the configuration. No unnecessary reordering of unchanged rules should occur.
Actual Behavior
Even though the new rule is added after RULEID1 in the TF, the Terraform plan renders the rules unordered. This causes existing rules to shift positions in the plan output, showing more changes than there actually are. For example, the new rule sometimes appears above RULEID1, pushing other rules down, which complicates the review process and can raise concerns unnecessarily.
Steps to Reproduce
Define orchestration rules.
Add a new rule to the orchestration file after an existing rule (e.g., RULEID2).
Run terraform plan.
Observe that the plan reorders the rules, even though only one new rule was added, and no changes were made to existing rules.
Likely Cause
The provider seems to handle lists or maps in an unordered fashion, which causes Terraform to perceive the resource as having changes when it reorders elements, even if their content remains unchanged.
What I Tried
Running terraform refresh to sync the state file with the actual resource state.
Result: This did not resolve the issue.
We would appreciate guidance or a resolution to ensure rules retain their defined order in the Terraform plan to prevent unnecessary changes from being displayed. Thank you!
The text was updated successfully, but these errors were encountered:
nmistry24
changed the title
Global Orchestration or Service Orchestration order is not maintained in the Terraform provider
Global Orchestration/Service Orchestration rule order is not maintained in the Terraform provider
Jan 14, 2025
Terraform Version
Terraform v1.10.4
PagerDuty Provider Version
v3.18.3
Affected Resource(s)
pagerduty_event_orchestration_global
Terraform Configuration Files
Expected Behavior
When adding a new rule to the orchestration YAML file (e.g., a rule added after
RULEID1
), the Terraform plan should preserve the ordering of the rules as defined in the configuration. No unnecessary reordering of unchanged rules should occur.Actual Behavior
Even though the new rule is added after
RULEID1
in the TF, the Terraform plan renders the rules unordered. This causes existing rules to shift positions in the plan output, showing more changes than there actually are. For example, the new rule sometimes appears aboveRULEID1
, pushing other rules down, which complicates the review process and can raise concerns unnecessarily.Steps to Reproduce
RULEID2
).terraform plan
.Likely Cause
The provider seems to handle lists or maps in an unordered fashion, which causes Terraform to perceive the resource as having changes when it reorders elements, even if their content remains unchanged.
What I Tried
terraform refresh
to sync the state file with the actual resource state.We would appreciate guidance or a resolution to ensure rules retain their defined order in the Terraform plan to prevent unnecessary changes from being displayed. Thank you!
The text was updated successfully, but these errors were encountered: