hashicorp / hashicorp/terraform-plugin-framework

Report details on why modification is a problem

Open
#282 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
384
Forks
107
Avg merge
3m
Merged PRs (30d)
1

Description

When I execute acceptance tests in my provider, I get an error:

```
Error: Provider produced invalid plan

Provider "registry.terraform.io/hashicorp/buildx" planned an invalid value
for buildx_instance.foo.bootstrap: planned value cty.False for a non-computed
attribute.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.
```

This might be related to my modifier implementation:

```
func (m boolDefaultModifier) Modify(ctx context.Context, req tfsdk.ModifyAttributePlanRequest, resp *tfsdk.ModifyAttributePlanResponse) {
b := req.AttributePlan.(types.Bool)

if !b.Null {
return
}

resp.AttributePlan = types.Bool{
Value: false,
}
}
```

Looking at the trace, all I see are messages like:

> attribute is not computed in schema, not marking unknown

So to me it seems like there is no real information as to what I am doing wrong - and I am pretty lost.
Would be great if there would be some useful trace or detailed error message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.