Use when a plan modifier on an attribute inside a SetNestedAttribute item reads req.ConfigValue or req.StateValue, or a set item's value turns (known after apply) with no config change.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/framework-set-item-modifier-reads-wrong-config/SKILL.mdTrigger: a modifier on groups[*].interval-style attributes compares config, state and plan, and real Terraform shows a sibling item's value as (known after apply) on every plan.
Fix: don't trust req.ConfigValue or req.StateValue there. The framework (v1.17, fwserver/attribute_plan_modification.go) takes both from the item at the same index. Config, state and plan sort their set items separately, so that item can be a different one. Instead:
req.PlanValue as the prior value, since Terraform proposed it from the prior item it paired;AtSetValue step of req.Path holds it.For the generated version, see setItemConfig in tools/iac-codegen/internal/generator/templates/schema.go.tmpl.
Why: offline modifier unit tests pass the "right" ConfigValue by hand, so the bug only shows up with real Terraform. Cover it with resource.UnitTest and two items: one that sets the field and one that leaves it out.
coralogix/terraform-provider-coralogix
7db6f79
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.