-
-
Notifications
You must be signed in to change notification settings - Fork 149
Inconsistent state changes for auth0 connection #237
Comments
Hello! We're just getting started with using terraform for our auth0 tenant and were also running into some weird behaviour with certain options not being retained. It turns out this behaviour is actually documented in auth0's api documentation: https://auth0.com/docs/api/management/v2/#!/Connections/patch_connections_by_id
Examining the outgoing requests and incoming responses (using Initial creation of a
All good so far, now when changing an unrelated option (
And the following
So here we only see the scripts (I guess they are always added?) and the Which is confirmed by a subsequent
Hope this helps! |
Thanks! Please let me know if there's anything else I can do to help, happy to reproduce things and whatnot. :) |
Hi @chiel, could you please try out 0.11.0 and see if this resolves the issue? |
It's now sending all options despite me now only changing the password policy and I can verify in the dashboard that the switch is now toggled on again! Thanks so much for the super fast turn around on this. :) |
Excellent! Happy to help @chiel. |
Description
Here's the use case:
I have an auth0 database connection configured through terraform with:
After applying a change to
custom_scripts
for example the provider will disable the above-mentioned values in Auth0 without showing the changes in the state even after apply (requires manual testing).Terraform Version
v0.12.24
Affected Resource(s)
Terraform Configuration Files
After initially applying, all configuration is correct, after making a change to custom scripts for instance, it will reset the other options (disable them).
Expected Behavior
The provider should not change attributes in Auth0 not reflected in the state changes.
Actual Behavior
The provider changes attributes in Auth0 not reflected in state changes.
Steps to Reproduce
terraform apply
custom_scripts.login
to something elseterraform apply
References
I looked into it a bit and discovered that if I remove the conditions parameters "IsNewResource(), HasChange()" from the
Bool
function calls the problem disappears. https://github.com/alexkappa/terraform-provider-auth0/blob/master/auth0/structure_auth0_connection.go#L295-L301The relevant change that introduced these: 0bbfa19#diff-cc37c481ef51c6d38cccadee845a916aR245
Community Note
The text was updated successfully, but these errors were encountered: