-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client grant fails after a manual change in the Auth0 UI #255
Comments
Hey @matthias-vanaverbeke 👋🏻 Every time the client grant gets toggled on or off inside the Management Dashboard it will delete and recreate a new grant with a brand new ID. Your assumption is correct, terraform manages its resources based on the ID so unfortunately whenever the grant ID is no longer available, it will try to re-create it. However if the toggle is already on you get the 409 Conflict Error. This isn't really an issue with the provider but rather a "unique" way of managing grants from the Management API. As a guideline:
Unfortunately every time you do out of bound changes you have to re-adjust the terraform state. Let me know if you have any follow up questions. Happy to clarify further. |
Hi @sergiught Indeed, ideally we strictly use terraform for configuring Auth0. However, in a development workflow, making changes in the management UI is sometimes the quickest way to validate Auth0 behavior. |
We just ran into this as well. From a user perspective, toggling the grant off and on in the UI doesn't suggest I'm removing the resource and adding a new one. |
Thanks for bumping this again, I'll reopen the issue and reassess if there's anything else we can do to improve the DX. |
Hey folks 👋🏻 There's an improvement available now in the latest release v0.45.0. Please give it a go and let us know if you have any issues with it. Thanks! Docs: https://registry.terraform.io/providers/auth0/auth0/0.45.0/docs |
Describe the problem
We have defined a terraform client grant for accessing the Management API. This works well, until someone manually toggles the grant off and back on in the management UI (e.g. for debugging). Any subsequent
terraform plan
tries to recreate the grant, resulting in a 409 error because there can only exist 1 grant between a client and a resource server:409 Conflict: A client grant already exists between <client id> and <audience>
Toggling the grant in the UI results in a new grant id so our assumption is that the grant id is used in the terraform plan phase.
What was the expected behavior?
The manually created grant should be updated.
Reproduction
terraform plan && terraform apply
terraform plan && terraform apply
Environment
terraform-provider-auth0
used: 0.31.0The text was updated successfully, but these errors were encountered: