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 messagvariables:
url: "https://service-of-${projectId}/subscriber"
topics:
invitedUser:
subscriptions:
- name: sendInvitationMail
endpoint: "${url}/sendInvitationMail"
- name: sendGroupNotification
endpoint: "${url}/sendGroupNotification"
- name: sendReinvitationMail
pull: truetop 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-tokenRevoke it and re-login if it is not valid.
$ gcloud auth application-default revoke
$ gcloud auth application-default login$ makePRs accepted
MIT © IzumiSy