Recall & Review
beginner
What is a variable in GCP infrastructure as code?
A variable is a placeholder used to store values that can change, like names or sizes, so you can reuse and customize your infrastructure easily.
Click to reveal answer
beginner
Why use outputs in GCP infrastructure templates?
Outputs show important information after deployment, like IP addresses or resource names, so you can use them in other steps or share with your team.
Click to reveal answer
intermediate
How do variables improve your GCP deployment templates?
Variables let you change settings without rewriting code, making your templates flexible and easier to manage, like changing a server size without editing many places.Click to reveal answer
intermediate
What is the difference between a variable and an output in GCP templates?
Variables are inputs you set before deployment to customize resources. Outputs are results you get after deployment to see or use resource details.
Click to reveal answer
beginner
Give an example of when you would use an output in a GCP deployment.
You might output the external IP of a virtual machine so you can connect to it or share it with others after deployment.
Click to reveal answer
What is the main purpose of a variable in GCP deployment templates?
✗ Incorrect
Variables hold values you can change to customize your deployment without rewriting the template.
What does an output in a GCP template provide?
✗ Incorrect
Outputs give you details about resources after deployment, like IP addresses or names.
Which of the following is NOT a good use of variables in GCP templates?
✗ Incorrect
Hardcoding values like IP addresses defeats the purpose of variables, which are meant to be flexible.
When should you use outputs in your GCP deployment?
✗ Incorrect
Outputs are used after deployment to retrieve useful information about the created resources.
How do variables and outputs work together in GCP templates?
✗ Incorrect
Variables provide input values before deployment; outputs provide information after deployment.
Explain what variables and outputs are in GCP infrastructure templates and why they are useful.
Think about inputs before deployment and information after deployment.
You got /4 concepts.
Describe a simple example where you use a variable and an output in a GCP deployment template.
Imagine setting a server size and then getting its IP address.
You got /3 concepts.