CtrlK
BlogDocsLog inGet started
Tessl Logo

framework-optional-computed-nested-object

Use when Create fails with 'Received unknown value' on an Optional+Computed SingleNestedAttribute Path targeting a Go struct pointer. Model that field as types.Object.

69

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Optional+Computed nested object unknown on create

Trigger: req.Plan.Get fails with Received unknown value… Path: <attr> Target Type: *…Model Suggested Type: basetypes.ObjectValue when the nested block is omitted from HCL.

Fix: Store the attribute as types.Object in the resource model (not *SomeModel). Decode with .As() only when !IsNull() && !IsUnknown(). Flatten with types.ObjectValueFrom / ObjectNull.

Why: Omitted Optional+Computed nested attributes are unknown on create. Go struct pointers cannot represent unknown; types.Object can.

Repository
coralogix/terraform-provider-coralogix
Last updated
First committed

Is this your skill?

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.