auth0-deploy-cli icon indicating copy to clipboard operation
auth0-deploy-cli copied to clipboard

the settings of emailTemplate and emailProvider are not deleted though AUTH0_ALLOW_DELETE is set "true"

Open hayashi-ay opened this issue 2 years ago • 3 comments

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

hayashi-ay avatar Sep 15 '22 09:09 hayashi-ay

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.

willvedd avatar Sep 16 '22 12:09 willvedd

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.

willvedd avatar Oct 13 '22 16:10 willvedd

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.

willvedd avatar Oct 19 '22 17:10 willvedd

Fixed with 7.15.2. Thanks for reporting!

willvedd avatar Jan 03 '23 18:01 willvedd