Created
December 2, 2018 23:32
-
-
Save fmachado091/e4e5fced2c9f4406e8929e626a6a91ab to your computer and use it in GitHub Desktop.
How to create and setup a GCP project with Cloud Pub/Sub topics and subscriptions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# login with your google credentials | |
# you will be asked to either use an existing project or create a new one | |
# for this article, I created the project hello-spring-cloud-gcp | |
$ gcloud init | |
# enable the Pub/Sub API | |
$ gcloud services enable pubsub.googleapis.com | |
# create a new Pub/Sub topic | |
$ gcloud pubsub topics create hello-pubsub | |
# create a subscription for the topic | |
$ gcloud pubsub subscriptions create --topic hello-pubsub hello-pubsub-subscription |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment