Google ACE Setting Up a Cloud Solution Environment Practice Question
A Cloud Shell user wants to persist Terraform state files across sessions. What is the best approach?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Store them in the home directory ($HOME)
Cloud Shell provides a persistent 5GB home directory. Storing state files there ensures they persist across sessions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store them in /tmp
Why it's wrong here
The /tmp directory on Cloud Shell is an ephemeral filesystem tied to the current session. Once your session ends or times out after 20 minutes of inactivity, all files in /tmp are permanently deleted. Terraform state files stored there would be lost and unrecoverable, so /tmp cannot be used for persistence.
- ✗
Store them in a Cloud Storage bucket and mount via gcsfuse
Why it's wrong here
Mounting a Cloud Storage bucket with gcsfuse is a viable way to persist Terraform state, but it is unnecessarily complex for a single-user Cloud Shell workflow. You would need to create or configure a bucket, install or enable gcsfuse, and re-mount the bucket and set environment variables on each new session because the mount does not survive session restarts. Cloud Shell already provides a simpler persistent location — the home directory — so the additional overhead and potential permission issues make this not the best choice.
- ✗
Store them on the instance's local SSD
Why it's wrong here
Cloud Shell runs on a transient virtual machine with no persistent local SSD that retains data after the session ends. Any files written to an instance's local disk are destroyed when the underlying VM is torn down, unlike the home directory which is backed by a persistent storage volume. Therefore, storing Terraform state on the instance's local SSD offers no persistence across sessions.
- ✓
Store them in the home directory ($HOME)
Why this is correct
The home directory ($HOME) in Cloud Shell is the designated persistent storage area, backed by a 5GB disk that survives across sessions and idle timeouts. Files saved there, including Terraform state files, are retained for later use and are protected from session cleanup. This makes $HOME the simplest and correct choice for persisting state in a personal Cloud Shell environment.
Go deeper
Related to this question
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.