Overview
When using the auth0_connection_clients
resource to enable applications on a connection, the following error is observed:
Error: 404 Not Found: The connection does not exist
Applies To
- Terraform
- Auth0 Connections
Cause
Possible causes:
- A mismatch between the local and remote state. For example, if the connection was deleted in Auth0 after it was previously created using Terraform.
- The
auth0_connection
resource uses a different provider pointing to a different tenant. The result is that theauth0_connection
resources exist in another tenant but not the one under which theauth0_connection_clients
will be applied.
Solution
A. If due to a mismatch between local and remote state, either:
- Delete the connection in Auth0 and rerun terraform apply to create a new connection and update the state with its new ID.
or - Modify the existing Terraform state or revert to a previous version if available so that the ID of the
auth0_connection
resource matches the ID of the connection in Auth0.
B. If due to the auth0_connection
resource being under a different provider, depending on the configuration, either set an explicit provider alias in the resource block or remove the existing alias so it uses the default auth0 provider.