Skip to content

Import fails when processing the type emailProvider and creating a custom email provider action in the same execution #950

Closed
@jeanfdmelo

Description

@jeanfdmelo

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When importing the emailProvider configuration and creating a custom email provider action via a0deploy import, the operation fails during the processChanges stage when processing the emailProvider type.

Expectation

The processing of the emailProvider type does not fail during a0deploy import if the required action is also created in the same import.

Workaround
To overcome this, we first create the action and then add the emailProvider configuration.

  1. Run a0deploy import without the emailProvider property in tenant.yml. This will create the action.
  2. Then, run a0deploy import again, this time with the emailProvider property in place. Since the action has already been created, the processing of emailProvider will no longer fail."

However, we expect this to work in a single execution.

Reproduction

1 - Given the tenant.yml configuration has the emailProvider type being enabled and the custom email provider action being created in the same import.

tenant.yml

emailProvider:
  name: custom
  credentials: {}
  enabled: true
actions:
  - name: Custom Email Provider
  (...)
triggers:
  custom-email-provider:
    - action_name: Custom Email Provider
      display_name: Custom Email Provider

2 - When import is executed

a0deploy import --input_file tenant.yaml

3 - Then command fails with the error message:

Problem running command import during stage processChanges when processing type emailProvider
No deployed action of type custom-email-provider was found

Deploy CLI version

7.24.2

Node version

20.14.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions