diff not properly produced when overwriting options
in auth0_connection
#1111
Labels
🪲 bug
Something isn't working
options
in auth0_connection
#1111
Checklist
Description
When updating
options
inauth0_connection
, the result diff is not properly produced. It only shows added or updated resources, and not the deleted ones.Suppose you set your
password_policy
as"excellent"
by hand. You import your config to Terraform without explicitly specifyingoptions
block. After a while you find you need to configurecustom_scripts
which will be defined inoptions
. You create anoptions
block with onlycustom_scripts
defined. When you apply, you will lose all otheroptions
that were configured on auth0 tenant. The terraform-provider-auth0 only shows diffs that were added tooptions
, and you will not be able to even notice you have deleted your password_policy.This problem originates from auth0 API behavior, that when the
options
inconnection
is updated, API response is displaying just a part of the affected elements. We have confirmed this by asking the auth0 support team, and also filed a support ticket to enhance this behavior.https://auth0.com/docs/api/management/v2/connections/patch-connections-by-id
This issue ticket is intended to share information to the community. Changing API behavior is not easy and takes time.
Expectation
After applying,
auth0_connection.<name>.options
should return all the configuration that are changed, including deleted parameters that were only defined in auth0 tenant and absent from Terraform configuration.Workaround should be: putting notes on https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection
Reproduction
auth0_connection
on terraformoptions.password_policy
options
, ex:options.custom_script
Auth0 Terraform Provider version
v1.7.1
Terraform version
1.10.2
The text was updated successfully, but these errors were encountered: