Skip to content

Inconsistencies with computed values #42

Description

@r-bennett

I've added a computed value other than Id to a resource for the first time, and I'm having trouble with it.

When the resource is first created, everything works as expected. But then on a subsequent apply, it tries to re-create the resource.

My ReadAsync and PlanAsync methods are straight passthroughs when I get this behaviour.

If I update ReadAsync to also populate the computed value, then an initial apply followed by a plan works fine (the plan now reports no changes needed). But add in a subsequent second apply, and the apply fails with

When expanding the plan for <resource>.<name> to
include new values learned so far during apply, provider
"<provider>" produced an invalid new value for
.<computed_field>: was known, but now unknown.

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

If I update PlanAsync to also populate the computed values when the Id is non-null, I still get the same error.

Any ideas on how to proceed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions