A0deploy import error saying "There is not a configured email provider"

I’ve exported using a0deploy export, then tried reimporting the same config. I haven’t modified the exported config at all. It fails on import with this error:

2025-01-21T16:30:21.676Z - error: Problem running command import during stage processChanges when processing type emailProvider
2025-01-21T16:30:21.676Z - error: There is not a configured email provider

There’s a bunch of success entries above - so it’s working for a lot of the config files, just failing at this point.

In the tenant.yaml, email provider is this:

emailProvider: {}

And in the portal, “Use my own email provider” is unchecked.

Given I haven’t touched the exported config files - is this a bug?

Thanks,
Dan

Hi @danclarke-smve,

It seems that the error is being thrown because of the email provider configuration object being imported. It is missing the required properties to define the emailProvider object, like the name and credentials. For example:

emailProvider:
  name: sendgrid
  credentials:
    api_key: '##SENDGRID_API_KEY##'
  default_from_address: example+support@sample.com
  enabled: true

If you do not use an email provider configured, could you try removing the entire line emailProvider: {} from your tenant.yaml file and reimport again?

Thanks,
Rueben

Thanks @rueben.tiow. But given the export is including that emailProvider entry - surely this is a bug? It feels like I should be able to export and then reimport without having to write text-parsing code to remove a particular entry before importing.