0
0
GCPcloud~10 mins

Cost optimization strategies in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the GCP service that helps reduce costs by automatically adjusting resources.

GCP
service = "[1]"
Drag options to blanks, or click blank then click option'
AAutoscaler
BCloud Storage
CBigQuery
DCloud Functions
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a storage service instead of a scaling service.
Selecting a data analytics service which doesn't manage resources automatically.
2fill in blank
medium

Complete the code to specify the billing export dataset name for cost analysis.

GCP
billing_export_dataset = "[1]"
Drag options to blanks, or click blank then click option'
Acost_export
Bbilling_export
Cbilling_data
Danalytics_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic dataset names that do not reflect billing data.
Confusing cost export with analytics data.
3fill in blank
hard

Fix the error in the code to correctly set a budget alert threshold percentage.

GCP
budget_alert_threshold = [1]
Drag options to blanks, or click blank then click option'
A0.8
B"80%"
C80
D80.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string with percent sign which causes errors.
Using a decimal instead of an integer.
4fill in blank
hard

Fill both blanks to create a filter that selects projects with labels for cost center and environment.

GCP
filter_expression = "labels.[1] = '[2]'"
Drag options to blanks, or click blank then click option'
Acost_center
Benv
Cproduction
Dfinance
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing label keys and values.
Using environment label key when cost center is required.
5fill in blank
hard

Fill all three blanks to define a cost optimization rule that stops idle VMs after a threshold.

GCP
rule = {"action": "[1]", "resource_type": "[2]", "idle_time_minutes": [3]
Drag options to blanks, or click blank then click option'
Astop
Bcompute_instance
C30
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'delete' which removes the VM permanently.
Using wrong resource type names.