auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
236 stars 147 forks source link

Azure EventGrid Log Stream creation fails #875

Closed BavoLuysterborg closed 6 months ago

BavoLuysterborg commented 6 months ago

Checklist

Description

When importing a previously exported Log Stream configuration into a different tenant, the create Log Stream operation fails with error:

Bad Request: Payload validation error: 'Data does not match any schemas from 'oneOf''.

Removing the sink.azurePartnerTopic property from the Log Stream config fixes this error.

Expectation

The sink.azurePartnerTopic property should be exported, however, during import, this property should be excluded from the object when performing a create operation.

Reproduction

  1. Export a tenant config containing a Log Stream pointing to an EventGrid sink, the resulting LogStreams section will be:
    logStreams:
    - name: Azure Event Grid
    filters:
      - type: category
        name: auth.token_exchange.fail
      - ...
    sink:
      azureSubscriptionId: <subscription id>
      azureRegion: <region>
      azureResourceGroup: <resource group>
      azurePartnerTopic: <partner topic name>
    status: active
    type: eventgrid
  2. Import the config into a different tenant that does not already have this EventGrid Log Stream set-up
  3. The create API call will fail with the following message:

    Bad Request: Payload validation error: 'Data does not match any schemas from 'oneOf''.

Deploy CLI version

7.20.0

Node version

20.6.1