Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

attach existing subscription to google pub sub topic

Found the solution in google:
gcloud
functions add-event-trigger FUNCTION_NAME  --trigger-resource TOPIC_NAME  --trigger-event google.pubsub.topic.publish  --subscription SUBSCRIPTION_NAME

But its showing Invalid choice: 'add-event-trigger'

gcloud functions deploy FUNCTION_NAME  --trigger-resource TOPIC_NAME  --trigger-event google.pubsub.topic.publish  --subscription SUBSCRIPTION_NAME

Its giving error: unrecognized arguments: --subscription



4 2 510
2 REPLIES 2