Provider produced inconsistent result after apply


I am currently writing a terraform provider.
After applying, the creation is done correctly but I received the message:

The following problems may be the cause of any confusing errors from downstream operations:
      - .status: planned value cty.StringVal("active") does not match config value cty.NullVal(cty.String)

Error: Provider produced inconsistent result after apply

I don’t understand where the problem is ?
Where to find the config value ?
Is-it in the read function ?


I’m new to this so I’m not entirely sure what that means either… but to take a quick try at it, I read that error message as: your config (.tf file) does not specify a status attribute, but the ResourceData does after your Create function finishes.

Is it possible that the status attribute should be marked Optional or Computed in your schema?

In fact, the resources was correctly created but I had a bug in my read function so terraform was not able to read what it just created.
Now I resolved several bugs and it’s work correctly.