Bird
Raised Fist0
GCPcloud~20 mins

GCP free tier and credits - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
๐ŸŽ–๏ธ
GCP Free Tier Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
๐Ÿง  Conceptual
intermediate
2:00remaining
Understanding GCP Free Tier Limits

Which of the following statements correctly describes the GCP Free Tier's always free usage limits?

AThe free tier offers limited monthly usage of specific services that renew every month indefinitely.
BThe free tier is a one-time credit that expires after 12 months and cannot be renewed.
CThe free tier requires a paid subscription after the first 7 days of usage.
DThe free tier provides unlimited usage of all GCP services without any time limit.
Attempts:
2 left
๐Ÿ’ก Hint

Think about which services have monthly limits that reset every month.

โ“ service_behavior
intermediate
2:00remaining
Behavior of GCP Free Trial Credits

What happens to your GCP resources when your $300 free trial credit expires without upgrading your account?

AResources are immediately deleted and cannot be recovered.
BAll resources continue running but you are billed automatically.
CResources are stopped or suspended, and you lose access until you upgrade your account.
DResources remain active but with limited performance until you upgrade.
Attempts:
2 left
๐Ÿ’ก Hint

Consider what happens when billing is no longer active.

โ“ security
advanced
2:00remaining
Securing Resources During Free Trial Expiry

Which is the best practice to protect your data when your GCP free trial is about to expire?

ADelete all resources immediately to avoid charges.
BExport important data to an external storage before the trial ends.
CIgnore the expiration and wait for automatic backup by GCP.
DShare your account credentials with others to maintain access.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how to keep your data safe without paying.

โ“ Architecture
advanced
2:00remaining
Designing a Cost-Efficient Architecture Using GCP Free Tier

You want to build a small web app using GCP Free Tier resources only. Which combination of services fits within the always free limits?

AUse Compute Engine with 2 vCPUs and 8GB RAM, Cloud SQL with 10GB storage, and Cloud Storage with 50GB.
BUse Cloud Functions with 5 million invocations, Cloud Spanner with 1 node, and Cloud Storage with 100GB.
CUse Kubernetes Engine with 3 nodes, BigQuery with 2TB queries, and Cloud Storage with 10GB.
DUse App Engine Standard Environment, Cloud Firestore in Native mode, and Cloud Storage with 5GB.
Attempts:
2 left
๐Ÿ’ก Hint

Check which services have always free usage and their limits.

โœ… Best Practice
expert
2:00remaining
Managing GCP Free Tier and Credits for Long-Term Projects

For a long-term project that starts with GCP free trial credits and then moves to always free tier, what is the best approach to avoid unexpected charges?

AEnable billing alerts and set budget limits to monitor usage and costs.
BDisable all APIs after the free trial ends to prevent charges.
CRely on GCP to automatically stop services when credits run out.
DUse multiple accounts to extend free trial credits indefinitely.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how to track and control spending proactively.

Practice

(1/5)
1. What is the main difference between GCP's free tier and free credits?
easy
A. Free tier requires payment after 30 days; free credits never expire.
B. Free credits provide always-free resources; free tier is a one-time spending amount.
C. Both free tier and free credits are unlimited and always available.
D. Free tier provides always-free resources; free credits are one-time spending amounts.

Solution

  1. Step 1: Understand GCP free tier

    The free tier offers limited resources that are always free, such as small VM instances or storage, available indefinitely.
  2. Step 2: Understand GCP free credits

    Free credits are a one-time amount of money given to spend on any GCP service, usually for new users to try services without paying upfront.
  3. Final Answer:

    Free tier provides always-free resources; free credits are one-time spending amounts. -> Option D
  4. Quick Check:

    Free tier = always free, credits = one-time [OK]
Hint: Free tier is always free; credits are one-time money [OK]
Common Mistakes:
  • Confusing free credits as always free
  • Thinking free tier expires after 30 days
  • Believing free credits are unlimited
2. Which of the following is a valid GCP free tier resource?
easy
A. A 1 vCPU, 0.6 GB RAM VM instance running 720 hours per month
B. A 1 vCPU, 3.75 GB RAM VM instance running 24/7
C. A 4 vCPU, 15 GB RAM VM instance running 100 hours per month
D. A 2 vCPU, 8 GB RAM VM instance running 1000 hours per month

Solution

  1. Step 1: Recall GCP free tier VM limits

    The free tier includes an f1-micro VM instance with 0.6 GB RAM and 1 vCPU, available up to 720 hours per month (full month).
  2. Step 2: Compare options to free tier specs

    A 1 vCPU, 0.6 GB RAM VM instance running 720 hours per month matches the free tier VM specs exactly; others exceed CPU, RAM, or hours limits.
  3. Final Answer:

    A 1 vCPU, 0.6 GB RAM VM instance running 720 hours per month -> Option A
  4. Quick Check:

    Free tier VM = f1-micro 0.6GB, 720 hrs [OK]
Hint: Free tier VM is small: 0.6GB RAM, 1 vCPU, 720 hrs/month [OK]
Common Mistakes:
  • Choosing larger VM sizes thinking they are free
  • Ignoring the 720 hours monthly limit
  • Confusing vCPU counts
3. A new GCP user has $300 free credits valid for 90 days. They create a VM costing $0.05 per hour. How many hours can they run the VM before credits run out?
medium
A. 1500 hours
B. 3000 hours
C. 6000 hours
D. 9000 hours

Solution

  1. Step 1: Calculate total hours from credits and cost

    Divide total credits ($300) by hourly cost ($0.05): 300 / 0.05 = 6000 hours.
  2. Step 2: Check if hours fit within 90 days

    90 days x 24 hours = 2160 hours max usage in 90 days, so credits allow more hours than time limit.
  3. Final Answer:

    6000 hours -> Option C
  4. Quick Check:

    Credits รท cost/hr = hours [OK]
Hint: Divide credits by hourly cost for max hours [OK]
Common Mistakes:
  • Ignoring the hourly cost and dividing incorrectly
  • Confusing days with hours
  • Not considering credit expiration
4. A user tries to apply free credits after the 90-day expiration period. What will happen?
medium
A. The credits will still apply without any issue.
B. The credits will be rejected and cannot be used.
C. The credits will apply but only partially.
D. The credits will convert to free tier resources.

Solution

  1. Step 1: Understand credit expiration rules

    GCP free credits expire after the set period (usually 90 days) and cannot be used afterward.
  2. Step 2: Determine system behavior on expired credits

    Once expired, credits are rejected and cannot be applied to any service usage.
  3. Final Answer:

    The credits will be rejected and cannot be used. -> Option B
  4. Quick Check:

    Expired credits = rejected [OK]
Hint: Expired credits cannot be used [OK]
Common Mistakes:
  • Assuming credits auto-extend or convert
  • Thinking partial credit use is allowed after expiry
  • Confusing free tier with credits
5. A startup wants to use GCP free credits and free tier to run a small app continuously for 3 months. Which strategy best uses both to avoid charges?
hard
A. Run a free tier VM 24/7 and use free credits for extra storage and network usage.
B. Use free credits only for VM and ignore free tier resources.
C. Run multiple large VMs using free credits and free tier simultaneously.
D. Use free tier for all resources and save free credits for after 3 months.

Solution

  1. Step 1: Understand free tier and credits usage

    Free tier provides always-free small VM and limited resources; free credits can pay for extra usage beyond free tier limits.
  2. Step 2: Plan resource allocation

    Run the small app on free tier VM continuously to avoid charges, and use free credits for additional storage, network, or bigger VMs temporarily.
  3. Final Answer:

    Run a free tier VM 24/7 and use free credits for extra storage and network usage. -> Option A
  4. Quick Check:

    Combine free tier + credits smartly [OK]
Hint: Use free tier first, credits for extras [OK]
Common Mistakes:
  • Ignoring free tier and using credits only
  • Running large VMs exceeding free tier limits
  • Saving credits without using them effectively