📖 Scenario: You work for a company that needs to ensure its cloud resources meet specific compliance standards. Your task is to create a simple configuration that lists compliance certifications and associates them with a GCP project.
🎯 Goal: Build a configuration that defines a GCP project with a list of compliance certifications attached as metadata labels.
📋 What You'll Learn
Create a dictionary called compliance_certifications with exact keys and values
Create a variable called project_id with the exact string value
Create a dictionary called project_config that includes project_id and labels referencing compliance_certifications
Add a final key compliance_enabled set to true in project_config
💡 Why This Matters
🌍 Real World
Companies must track compliance certifications on their cloud projects to meet legal and security requirements.
💼 Career
Cloud engineers and compliance officers often configure and verify compliance metadata in cloud environments.
Progress0 / 4 steps
1
Create compliance certifications dictionary
Create a dictionary called compliance_certifications with these exact entries: 'ISO27001': 'Certified', 'SOC2': 'In Progress', 'HIPAA': 'Certified'
GCP
Hint
Use curly braces to create a dictionary with the exact keys and values.
2
Create project ID variable
Create a variable called project_id and set it to the exact string 'my-gcp-project-123'
GCP
Hint
Assign the exact string to the variable project_id.
3
Create project configuration dictionary
Create a dictionary called project_config with keys 'project_id' set to the variable project_id and 'labels' set to the dictionary compliance_certifications
GCP
Hint
Use curly braces to create project_config with the specified keys and values.
4
Add compliance enabled flag
Add a key 'compliance_enabled' with the boolean value true to the existing project_config dictionary
GCP
Hint
Add the key and value inside the project_config dictionary.
Practice
(1/5)
1. What is the main purpose of compliance certifications in cloud services like Google Cloud?
easy
A. To reduce the cost of cloud storage
B. To increase the speed of cloud servers
C. To prove the cloud meets security and privacy standards
D. To improve the user interface of cloud consoles
Solution
Step 1: Understand the role of compliance certifications
Compliance certifications show that a cloud provider follows strict security and privacy rules.
Step 2: Identify the main goal in cloud context
The main goal is to prove trustworthiness and legal compliance, not performance or cost.
Final Answer:
To prove the cloud meets security and privacy standards -> Option C
Quick Check:
Compliance = Security and Privacy Proof [OK]
Hint: Certifications prove security and privacy, not speed or cost [OK]
Common Mistakes:
Confusing certifications with performance improvements
Thinking certifications reduce costs
Assuming certifications improve user interface
2. Which of the following is a valid way to check Google Cloud compliance certifications online?
easy
A. Visit the Google Cloud Compliance Resource Center website
B. Run a command in Google Cloud Shell to list certifications
C. Check the billing section in Google Cloud Console
D. Use Google Cloud Storage to store certification files
Solution
Step 1: Identify how to access compliance info
Google Cloud provides a dedicated Compliance Resource Center website for certifications.
Step 2: Eliminate incorrect methods
Commands, billing, or storage do not provide certification listings directly.
Final Answer:
Visit the Google Cloud Compliance Resource Center website -> Option A
Quick Check:
Compliance info is on the official website [OK]
Hint: Compliance details are on Google Cloud's official compliance website [OK]
Common Mistakes:
Trying to find certifications via command line
Looking in billing or storage sections
Assuming certifications are downloadable files
3. Consider this snippet describing compliance certifications:
certifications = ['ISO 27001', 'SOC 2', 'HIPAA']
if 'SOC 2' in certifications:
print('Google Cloud meets SOC 2 compliance')
else:
print('SOC 2 compliance not found')
What will be printed?
medium
A. Google Cloud meets SOC 2 compliance
B. SOC 2 compliance not found
C. Error: list not defined
D. No output
Solution
Step 1: Check if 'SOC 2' is in the list
The list contains 'SOC 2', so the condition is true.
Step 2: Determine the printed output
Since condition is true, it prints 'Google Cloud meets SOC 2 compliance'.
Final Answer:
Google Cloud meets SOC 2 compliance -> Option A
Quick Check:
'SOC 2' in list = True [OK]
Hint: Check if item is in list to decide output [OK]
Common Mistakes:
Assuming 'SOC 2' is missing
Confusing syntax causing errors
Thinking no output occurs
4. You wrote this code to check compliance certifications but it throws an error: