flagsmith/flagsmith provider version 0.9.1
Description
When creating a flagsmith_feature_state segment override with segment_priority=0,
the API ignores the requested value and auto-assigns a priority based on existing
overrides in the environment. If another override already holds priority 0,
the new one gets priority 1 regardless of what was requested.
This causes Terraform to fail with:
Provider produced inconsistent result after apply
.segment_priority: was cty.NumberIntVal(0), but now cty.NumberIntVal(1).
Steps to Reproduce
- Have a feature with two segment overrides (
override_0 priority 0, override_1 priority 1)
- Trigger a destroy+create on
override_0 (e.g. via replace_triggered_by)
override_1 remains in the API with priority 0 during the recreate
- Terraform creates
override_0 with segment_priority=0 - API returns 1
- Terraform errors: provider produced inconsistent result
Expected Behavior
The API should honor the segment_priority value provided on creation, or the provider
should handle priority conflicts gracefully (e.g. by reordering after creation).
Actual Behavior
The API auto-assigns segment_priority based on insertion order, ignoring the
requested value. The provider does not reconcile this mismatch.
Provider Version
flagsmith/flagsmith v0.9.1
Workaround
Pre-delete all segment overrides for the affected feature before applying, so
Terraform recreates them on a clean slate in the correct order.
flagsmith/flagsmith provider version 0.9.1
Description
When creating a
flagsmith_feature_statesegment override withsegment_priority=0,the API ignores the requested value and auto-assigns a priority based on existing
overrides in the environment. If another override already holds priority
0,the new one gets priority
1regardless of what was requested.This causes Terraform to fail with:
Steps to Reproduce
override_0priority 0,override_1priority 1)override_0(e.g. viareplace_triggered_by)override_1remains in the API with priority 0 during the recreateoverride_0withsegment_priority=0- API returns1Expected Behavior
The API should honor the
segment_priorityvalue provided on creation, or the providershould handle priority conflicts gracefully (e.g. by reordering after creation).
Actual Behavior
The API auto-assigns
segment_prioritybased on insertion order, ignoring therequested value. The provider does not reconcile this mismatch.
Provider Version
flagsmith/flagsmithv0.9.1Workaround
Pre-delete all segment overrides for the affected feature before applying, so
Terraform recreates them on a clean slate in the correct order.