Google Professional Cloud Developer Question 222
Single answerGoogle Cloud PlatformYour team has decided to use Google Cloud Workstations to provide developers with pre-configured development environments. One of the requirements is to ensure that the workstation environments are automatically terminated if inactive for a specified duration to optimize costs. Which feature or configuration option in Google Cloud Workstations would you use to achieve this?
- A
Set an idle timeout duration in the Workstation configuration.
- B
Enable preemptible instances for all workstations.
- C
Configure a Cloud Scheduler job to stop inactive workstations.
- D
Use a custom script to monitor activity and terminate idle workstations.
Show answer and explanation
Correct answer: A
Explanation
The idle timeout feature in Google Cloud Workstations is specifically designed to terminate workstations that are inactive for a predefined duration. This helps to optimize costs without requiring additional scripts or external tools. Other options, such as preemptible instances or custom scripts, are either not suitable for this use case or unnecessarily complex compared to the built-in feature.
- A. Correct.
This is correct. Google Cloud Workstations allows you to configure an idle timeout duration directly in the workstation configuration. This ensures that workstations are automatically terminated if they remain inactive for the specified duration.
- B. Incorrect.
This is incorrect. Preemptible instances are not used in Google Cloud Workstations because they are designed for short-lived, batch processing tasks and are terminated within 24 hours, which is not ideal for development environments.
- C. Incorrect.
This is incorrect. While you could use a Cloud Scheduler job, it is not the recommended or built-in method for managing idle workstations. Google Cloud Workstations already provides a native idle timeout feature.
- D. Incorrect.
This is incorrect. Writing a custom script is unnecessary because Google Cloud Workstations includes a built-in idle timeout feature, which is more efficient and easier to configure.