Nylas maintains this Go script that automatically provisions the correct GCP resources for you so you can enable Google PubSub Message Sync. See the Nylas documentation on PubSub for more information.
Running the script
Switch to the GCP project you want to add PubSub Message Sync to.
gcloud config set project $YOUR_PROJECT_NAME_HERE
Authenticate locally with GCP.
gcloud auth application-default login
Fetch the dependencies.
go get .
Run the program.
go run main.go --projectId $YOUR_PROJECT_NAME_HERE
Flags
Flag name
Description
Example
projectId
The GCP Project to run this script against
test-project-id
env
The Nylas environment to run against. Valid values are: us, eu, staging