GCP PubSub provisioning tool at a light speed ⚡
$ go get github.com/IzumiSy/pubsubroller
$ pubsubroller --help
Usage:
pubsubroller [OPTIONS]
Application Options:
-p, --projectId= target GCP project ID
-c, --config= configuration file path
-e, --endpoint= service endpoint
--dry dry run
--delete delete all topics and their subscriptions
Help Options:
-h, --help Show this help messag
variables:
url: "https://service-of-${projectId}/subscriber"
topics:
invitedUser:
subscriptions:
- name: sendInvitationMail
endpoint: "${url}/sendInvitationMail"
- name: sendGroupNotification
endpoint: "${url}/sendGroupNotification"
- name: sendReinvitationMail
pull: true
top level keys are variables
, which replaces placeholder in subscription names and endpoints, and topics
that have multiple subscriptions.
panic: rpc error: code = Unauthenticated desc = transport: oauth2: cannot fetch token: 400 Bad Request
Try checking if your Google Cloud credential is valid or not.
$ gcloud auth application-default print-access-token
Revoke it and re-login if it is not valid.
$ gcloud auth application-default revoke
$ gcloud auth application-default login
$ make
PRs accepted
MIT © IzumiSy