Bird
0
0

You try to create a subscription with the command gcloud pubsub subscriptions create sub1 but get an error. What is the most likely cause?

medium📝 Debug Q6 of 15
GCP - Cloud Pub/Sub
You try to create a subscription with the command gcloud pubsub subscriptions create sub1 but get an error. What is the most likely cause?
AMissing the --topic flag specifying the topic name
BSubscription name is invalid
CTopic does not exist
DYou need to delete the topic first
Step-by-Step Solution
Solution:
  1. Step 1: Check required parameters for subscription creation

    The command requires the --topic flag to specify which topic the subscription belongs to.
  2. Step 2: Identify missing flag

    The error occurs because the --topic flag is missing in the command.
  3. Final Answer:

    Missing the --topic flag specifying the topic name -> Option A
  4. Quick Check:

    Subscription create needs --topic flag [OK]
Quick Trick: Always include --topic when creating subscriptions [OK]
Common Mistakes:
  • Ignoring required flags
  • Assuming subscription name causes error
  • Thinking topic must be deleted first

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes