ALLOW_DELETE Not Deleting

Hi all.

I have developed a pipeline in Azure DevOps making use of the Auth0 Deploy CLI to enable us to do changes in our staging tenant, export them with the CLI, push them to the ADO repo and use the associated pipeline to push them to the other 2 environments of dev and prod.

Unfortunately, we have lots of unecessary actions in staging and dev that are not in prod and I want to use the pipeline to automate deleting them. I attempted this by exporting the prod tenant config, pushing that to the repo and then deployed it to staging with ‘ALLOW_DELETE’ set to true.

Be that as it may, the existing ones common to staging and prod were updated, but the ones not in prod did not get deleted. What have I done wrong? Is the allow delete line in the wrong place? Also, before you ask, the tenant yml file doesn’t have the extra resources in it. It does reflect what is in prod.

Here is the snippet from the yml for the pipeline:

    - script: |

          a0deploy import --config_file=tenant/config-staging.json --input_file=tenant.yaml

        displayName: 'Deploy Config to Auth0 Staging'

        workingDirectory: tenant

        env:

          AUTH0_DOMAIN: $(staging_domain)

          AUTH0_CLIENT_ID: $(staging_client_id)

          AUTH0_CLIENT_SECRET: $(staging_client_secret)

          AUTH0_INCLUDED_ONLY: '\["actions", "branding", "emailTemplates", "pages", "prompts"\]'

          AUTH0_ALLOW_DELETE": true

Hi @shayan.bhattacharya

Could you let me know if the yaml snipped you have shared is the exact one in your pipeline?

If so, it appears that there is a syntax error in the AUTH0_ALLOW_DELETE where a double quote is present and also the AUTH0_INCLUDED_ONLY line contains backslash escapes which might invalidate the json.

Could you let me know if everything runs correctly by doing the following:

  1. Correct the AUTH0_ALLOW_DELETE line so the variable name has no stray quote. It should read AUTH0_ALLOW_DELETE: true, with the same indentation as the other variables in the env block.
  2. Replace the AUTH0_INCLUDED_ONLY value with a plain JSON array string, with no backslashes: AUTH0_INCLUDED_ONLY: '["actions","branding","emailTemplates","pages","prompts"]'.

Kind Regards,
Nik