Closed MyMirelHub closed 4 years ago
Hi @MyMirelHub, I believe the provider should force a new resource upon changes to the client grants audience or client id. These fields are not allowed to be updated by the api.
Since your resource server is being re-created, the client grant changes and tries to update. But its not allowes to.
Feel free to give 0.11.0 a go. It should force a new resource if the auth0_client_grant
's audience
or client_id
have changed.
Description
When I make changes to the
auth0_client
andauth0_resource_server
(in this example a simple name change) while keeping the sameauth0_client_grant
binding, I get the following error:The plan is:
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
I would have expected it to have executed like in the plan, where after the names were changed on the client and resource server, the client_grant would bind them accordingly.
Actual Behavior
After the client and the resource server is updated, an inconsistent state error occurs when terraform tries to update auth0_client_grant tries to update the resource.
Steps to Reproduce
auth0_resource_server
,auth0_client
, and bind them using anauth0_client_grant
auth0_resource_server
andauth0_client
terraform apply
Debug Output
This is a summary, full gist is: https://gist.github.com/MyMirelHub/2d38dbd024b22a1cbb6a705b5f434729#file-issue-txt
References
Possibly related to
186
Community Note