Skip to content

GCP PubSub provisioning tool at a light speed ⚡(asynchronous, parallel)

License

Notifications You must be signed in to change notification settings

IzumiSy/pubsubroller

Repository files navigation

pubsubroller

CircleCI standard-readme compliant

GCP PubSub provisioning tool at a light speed ⚡

Table of Contents

Install

$ go get github.com/IzumiSy/pubsubroller

Usage

 $ 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

Configuration Example

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.

Troubleshooting

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

Development

$ make

Contributions

PRs accepted

License

MIT © IzumiSy

About

GCP PubSub provisioning tool at a light speed ⚡(asynchronous, parallel)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published