auth0-deploy-cli
auth0-deploy-cli copied to clipboard
the settings of emailTemplate and emailProvider are not deleted though AUTH0_ALLOW_DELETE is set "true"
Description
After setting emailTemplate and emailProvider through Auth0 Console or auth0-cli, the settings are not deleted though executing a0deploy
with empty configurations of them and AUTH0_ALLOW_DELETE=true
.
Reproduction
- tenant.yaml
...
emailProvider: {}
emailTemplates: []
...
- config.json
{
...
"AUTH0_ALLOW_DELETE": true,
...
}
- the code to execute
a0deploy import -c config.json -i tenant.yaml
Environment
Please provide the following:
$ a0deploy --version
7.14.3
Unfortunately, the removal resources through explicitly empty sets is a bit spotty. With a recent refactor we've laid the foundation to complete this work, but we just need to appropriately implement on a per-resource basis. Will keep this open to track the progress.
Update: You actually cannot delete email templates. Once they are set, they can only be updated. So we cannot support the template deletion behavior you propose above.
However, we can delete the email provider. In fact I've already verified this with a PoC. Though I don't see us immediately releasing this. Instead, I'd like to present a warning to users that the behavior will change. I don't think that folks would use an empty object as their email provider configuration, but I can't rule it out either.
Can expect another update to come in due time.
Initial warning about email provider deletion has been released with 7.15.1. The plan is to let that exist in the wild for about a month, at which point we will release the real fix (#673). Will provide another update in this thread once that time has come.
Fixed with 7.15.2. Thanks for reporting!