Bird
0
0

Which of the following is the correct way to set an environment variable named API_KEY with value 12345 in a Google Cloud Run service YAML?

easy📝 Configuration Q12 of 15
GCP - Cloud Functions
Which of the following is the correct way to set an environment variable named API_KEY with value 12345 in a Google Cloud Run service YAML?
Aenv: - name: API_KEY value: '12345'
Benvironment_variables: API_KEY: 12345
Cvariables: API_KEY = '12345'
Dset_env: API_KEY: '12345'
Step-by-Step Solution
Solution:
  1. Step 1: Recall Cloud Run YAML env syntax

    Cloud Run uses the env list with name and value keys to set environment variables.
  2. Step 2: Check options for correct YAML format

    env: - name: API_KEY value: '12345' matches the correct syntax. Other options use incorrect keys or formats not supported by Cloud Run.
  3. Final Answer:

    env: - name: API_KEY value: '12345' -> Option A
  4. Quick Check:

    Cloud Run env uses name and value keys [OK]
Quick Trick: Look for 'env' with name and value keys in YAML [OK]
Common Mistakes:
  • Using incorrect keys like environment_variables or variables
  • Assigning values with '=' instead of colon
  • Not using a list for env variables

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes