exam questions

Exam Professional Cloud DevOps Engineer All Questions

View all questions & answers for the Professional Cloud DevOps Engineer exam

Exam Professional Cloud DevOps Engineer topic 1 question 96 discussion

Actual exam question from Google's Professional Cloud DevOps Engineer
Question #: 96
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

You are using Terraform to manage infrastructure as code within a CI/CD pipeline. You notice that multiple copies of the entire infrastructure stack exist in your Google Cloud project, and a new copy is created each time a change to the existing infrastructure is made. You need to optimize your cloud spend by ensuring that only a single instance of your infrastructure stack exists at a time. You want to follow Google-recommended practices. What should you do?

  • A. Create a new pipeline to delete old infrastructure stacks when they are no longer needed.
  • B. Confirm that the pipeline is storing and retrieving the terraform.tfstate file from Cloud Storage with the Terraform gcs backend.
  • C. Verify that the pipeline is storing and retrieving the terraform.tfstate file from a source control.
  • D. Update the pipeline to remove any existing infrastructure before you apply the latest configuration.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Xoxoo
8 months, 2 weeks ago
Selected Answer: B
The Terraform tfstate file contains the state of the infrastructure managed by Terraform. Storing this file in Cloud Storage with the Terraform Google Cloud Storage (GCS) backend ensures that it is shared across executions of the pipeline.
upvoted 1 times
...
alpha_canary
8 months, 3 weeks ago
Selected Answer: B
https://cloud.google.com/docs/terraform/resource-management/managing-infrastructure-as-code#configuring_terraform_to_store_state_in_a_cloud_storage_bucket
upvoted 1 times
...
kish18
10 months, 1 week ago
B is correct, storing the state file to the gcs bucket maintains the state correctly
upvoted 1 times
...
xhilmi
10 months, 4 weeks ago
Selected Answer: B
Option B is the recommended approach to optimize cloud spending and ensure a single instance of your infrastructure stack exists at a time when using Terraform within a CI/CD pipeline. By storing and retrieving the terraform.tfstate file from Cloud Storage with the Terraform Google Cloud Storage (GCS) backend, you centralize the state management. This ensures that Terraform has a single source of truth for the infrastructure state, preventing the creation of redundant instances. The GCS backend enables state locking, consistency, and collaboration across the CI/CD pipeline, allowing for proper tracking and management of infrastructure changes. This practice helps avoid unnecessary duplication of resources and promotes efficient cloud spend management.
upvoted 1 times
...
mshafa
12 months ago
Selected Answer: B
B is correct.
upvoted 1 times
...
nhiguchi
1 year ago
Selected Answer: B
B is correct.
upvoted 3 times
...
PrayasMohanty
1 year ago
B appears correct to me.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago