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.

Use A new enum attribute must not default to unspecified in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add A new enum attribute must not default to unspecified and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

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

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

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

A new enum attribute must not default to unspecifiedStart free

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
Oct 2026
Advanced
Item type
skill
Key
new-enum-attribute-must-not-default-to-unspecified
Source
github.com/coralogix/terraform-provider-coralogix