Unable to publish an Eventarc event to a region other than us-central1

119 views Asked by At

When i publish a event directly to eventArc using firebase-admin/eventarc with a region other than us-central1 it failed with the error below. Is it a limitation of the Eventarc Publishing API ?

Code used to publish the event:

const allowedEventTypes = ["eu.testing.v1.test"];
const eventarcChannel = `projects/${process.env.GCLOUD_PROJECT}/locations/europe-west1/channels/my-channel`;
const eventChannel = getEventarc().channel(eventarcChannel, {
  allowedEventTypes: allowedEventTypes,
});
const eventType = "test";
const data = {
    testData: "1234",
};
await eventChannel?.publish({
    type: `eu.testing.v1.${eventType}`,
    data: data,
    source: "testing.eu",
});

Error encounter:

Error while publishing event PrefixedFirebaseError: Unexpected response with status: 403 and body: {
  "error": {
    "code": 403,
    "message": "Read access to project <project-name> was denied",
    "status": "PERMISSION_DENIED"
  }
}

If i swap the location inside eventarcChannel to us-central1 it works.

0

There are 0 answers