auth0-deploy-cli
auth0-deploy-cli copied to clipboard
Support management of tenant environment tag
Checklist
- [X] I have looked into the README and have not found a suitable solution or answer.
- [X] I have looked into the documentation and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have upgraded to the latest version of this tool and the issue still persists.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
When exporting a config using the Auth0 deploy CLI, it doesn't seem to record the environment tag in the emitted config file. After switching my tenant's environment tag and re-exporting the config to test this, the exported config was identical.
Expectation
Environment tag is stored in the config files in the tenant object (tenant.json when using the directory format).
Reproduction
- Given an Auth0 tenant
- When you export its config, change its environment tag, then export it again
a. Export its config:
a0deploy export --config_file mytenant.json --format yaml --output_folder ./export_testb. Change its environment tag in the Auth0 management UI c. Export the config again - Then the config should be different than it was in step 2a because the tag changed
Deploy CLI version
7.16.1
Node version
18.4.0
You're correct that the Deploy CLI does not support the management of the tenant's environment flag. This is because that single configuration is not supported by the Management API, or to be more correct, it isn't exposed publicly. This functionality has obvious value for both this tool and the Terraform Provider and IMO it really should be added. It appears that this feature has been internally discussed but nowhere near a point where it could be released. I will channel this request to the proper teams.
So unfortunately, for the near-term this won't be added but given that tenant creation is still a manual process, the additional step of configuring the environment hopefully isn't too much toil.
Thank you for the detailed response! I agree that it's not too much of a hassle, especially since it's probably less likely to change than most fields.
The fact that this setting also appears to have serious repercussions for how Auth0 prioritizes traffic is also an important factor to consider. This makes it both better and worse that it's not part of the tenant management API... better because the semantic meaning of the change can't be lost in cryptic configs, but worse because someone can just flip a switch with no sort of awareness or review. 😅