Flagsmith / Flagsmith/terraform-provider-flagsmith
Add flagsmith_feature_segment_overrides resource for SSOT segment override management
- Dominant language
- Go
- Stars
- 6
- Forks
- 3
- Avg merge
- 18h 13m
- Merged PRs (30d)
- 8
Description
## Context
Raised in #212 — when segment overrides are created outside of Terraform (e.g. via the Flagsmith UI), `terraform apply` does not remove them because Terraform only manages resources it knows about. The current per-resource model (`flagsmith_feature_state` with `segment_id`) requires users to manually import any externally created overrides, which is error-prone.
## Proposal
Add a new resource that manages the complete set of segment overrides for a given feature+environment, so that Terraform can treat the declared overrides as the single source of truth. Any overrides that exist on the server but are not declared in the resource would be removed on apply.
This would be opt-in and backwards-compatible — the existing `flagsmith_feature_state` resource would continue to work as-is.
## Related
- #212
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing flagsmith_feature_state resource and the context in issue #212 to understand how segment overrides are currently managed. Define the complete-set behavior for a feature and environment, including removal of undeclared server-side overrides; the work is done when the new resource provides the proposed opt-in SSOT management without changing the existing resource.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- infrastructure, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100