A new enum attribute must not default to unspecified

SkillCloud & infra

Use when adding an Optional+Computed enum to a released resource, or a Provider migration job fails with 'expected NoOp, got action(s): [update]'. A static unspecified default breaks upgrades.

Available today. Use it from your connected AI after setup.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the A new enum attribute must not default to unspecified skill

What this skill tells your AI

The instructions your AI receives, as published by coralogix/terraform-provider-coralogix in .claude/skills/new-enum-attribute-must-not-default-to-unspecified/SKILL.md and read by ahel’s review.

Trigger: adding an enum to a resource that already has released versions, or a Provider migration (...) job failing expected NoOp, got action(s): [update] while every create-and-apply test passes.

Fix: three parts, all needed.

Optional: true, Computed: true,                                                        // 1. no Default
PlanModifiers: []planmodifier.String{stringplanmodifier.UseNonNullStateForUnknown()},  // 2.
// 3. flatten an unmapped value (the enum's zero value "") to utils.UNSPECIFIED, not ""

A default claims what the API stores for an omitted field, and it usually stores something else. Part 3 stops flatten writing "", which the schema disallows. Part 2 stops the framework planning an omitted nested Optional+Computed attribute as unknown; the non-null variant keeps a list element added on update unknown. Removing the attribute now keeps the previous value, so name unspecified as the reset in the description.

Why it hides: sending a value means the API echoes it, so the map never misses and the plan is never unknown. Only migration and PlanOnly steps omit the field.

Signals

GitHub stars
22
Forks
14
Last commit
Sep 2026
Advanced
Item type
skill
Key
new-enum-attribute-must-not-default-to-unspecified
Source
github.com/coralogix/terraform-provider-coralogix