Skip to content
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

Auth0 connection resource was deleted in the process of upgrading from v0.31.0 to v0.50.2 without any warnings #914

Open
6 tasks done
BhargavThakrar opened this issue Jan 26, 2024 · 0 comments
Labels
🪲 bug Something isn't working

Comments

@BhargavThakrar
Copy link

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this provider and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Auth0 connections were deleted without any warnings

Expectation

The upgrade should have gone through successfully after making the necessary changes

Reproduction

There are two main things deprecated in v0.50.2:
1) The way we specify the connections for clients
The enabled_clients argument has been completely removed from auth0_connection resource. So I had to move that enabled_clients to a new resource called auth0_connection_clients. This has been changed for all the connections we support (google, apple, slack and auth0)

2) The way we specify client credential authentication method
The token_endpoint_auth_method argument is deprecated from auth0_client resource. We need to now use auth0_client_credentials resource to specify this

Of which there was no problem with point no 2, everything was fine there.

But for point no 1, the first terraform plan run complained about fields_map cannot be null even though I was not using it. And then I found that the data type of fields_map was changed and to support such breaking changes we should ideally remove and import the resource. This fixed the problem.

Then my plan showed nothing about the actual connections being destroyed and just mentioned that the auth0_connection_clients resource will be created. The first apply complained that the clients are already enabled for the connections, please import them. So I imported all the connections we had and than re-ran apply. This time it gave another error like this one:

When applying changes to auth0_connection_clients.apple_clients_assoc[0], provider "registry.terraform.io/auth0/auth0" produced an unexpected new value: Root resource was present, but now absent

And I just happen to see the auth0 dashboard and all my connections were already gone. What went wrong here?

Auth0 Terraform Provider version

v0.50.2

Terraform version

v0.13.6

@BhargavThakrar BhargavThakrar added the 🪲 bug Something isn't working label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant