After starting the PubSub emulator using the gcloud
CLI and loading the environment variables accordingly, the gcloud
CLI remains authenticated with our Google production account. Basically, we did:
# Starting the emulator in one shell
gcloud beta emulators pubsub start
# In a different shell
$(gcloud beta emulators pubsub env-init)
gcloud pubsub topics list
However, our production topics are listed here. The expected output would be an empty list, as we're trying to list the topics from the freshly started PubSub emulator, which contains nothing at start up.
We are used to start the Bigtable emulator and connect to it without issues with the cbt
CLI which is aware of the BIGTABLE_EMULATOR_HOST
. Is it possible to have the same kind of tool to manage/check PubSub emulator resources? It simply seems that gcloud
is not aware of *_EMULATOR_HOST
variables.
Thank you in advance,
PS: Output of our gloud version
:
Google Cloud SDK 182.0.0
alpha 2017.09.15
beta 2017.09.15
bigtable
bq 2.0.27
cbt
core 2017.12.01
gcloud
gsutil 4.28
kubectl
pubsub-emulator 2017.09.15
api_endpoint_overrides/pubsub
below, worked for my use case. – Bielefeld