Google Professional Cloud DevOps Engineer exam dumps

Google Professional Cloud DevOps Engineer practice question 68 of 268

Professional Cloud DevOps Engineer. Associate level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud DevOps Engineer Question 68

Select 3Google Cloud Platform

You are tasked with implementing a CI/CD pipeline for managing infrastructure in your Google Cloud environment. Your team uses Terraform for infrastructure as code (IaC) to provision GKE clusters, managed instance groups, and a Cloud Service Mesh configuration. Which steps should you include in your CI/CD pipeline to ensure a reliable and automated infrastructure deployment process?

  1. A

    Run Terraform plan in the CI pipeline to validate the changes before applying them.

  2. B

    Store Terraform state files in a version-controlled Git repository.

  3. C

    Implement automated tests in the pipeline to validate the functionality of the infrastructure after deployment.

  4. D

    Use a Google Cloud Build trigger to automatically apply Terraform changes to the production environment on every commit to the repository.

  5. E

    Enable Terraform state locking by using a remote backend such as Google Cloud Storage with a bucket lock.

Show answer and explanation

Correct answers: A, C, E

Explanation

To ensure a reliable and automated infrastructure deployment process using CI/CD, it is crucial to validate changes (e.g., using 'Terraform plan'), implement automated tests to confirm functionality, and enable state locking to prevent corruption. Storing state files in a secure remote backend like Google Cloud Storage is a best practice, while directly applying changes to production on every commit can introduce risks and is not recommended.

  • A. Correct.

    Running 'Terraform plan' in the CI pipeline is a best practice for validating changes before they are applied. It ensures that unintended changes do not get deployed.

  • B. Incorrect.

    Storing Terraform state files in a Git repository is not recommended because it can lead to conflicts, security risks, and a lack of state locking. Instead, a remote backend should be used.

  • C. Correct.

    Automated tests validate the functionality of infrastructure after deployment, ensuring that the infrastructure behaves as expected and reducing risks of misconfiguration.

  • D. Incorrect.

    Automatically applying Terraform changes to production on every commit is risky and not aligned with best practices. Manual approvals or additional checks are typically required for production changes.

  • E. Correct.

    Enabling Terraform state locking with a remote backend like Google Cloud Storage ensures consistency and prevents multiple concurrent operations from corrupting the state.

Timed practice exam

Take a Google Professional Cloud DevOps Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam