Recall & Review
beginner
What is the purpose of using Terraform in GitLab CI?
Terraform in GitLab CI automates the process of creating, changing, and managing infrastructure as code during the software development lifecycle.
Click to reveal answer
beginner
Which GitLab CI file defines the Terraform pipeline stages?
The
.gitlab-ci.yml file defines the pipeline stages, including Terraform commands like init, plan, and apply.Click to reveal answer
intermediate
Why should Terraform state files be stored remotely in GitLab CI pipelines?
Storing Terraform state files remotely ensures team collaboration, prevents state conflicts, and keeps state data safe and consistent across pipeline runs.
Click to reveal answer
beginner
What is the role of the
terraform plan command in GitLab CI?terraform plan shows the changes Terraform will make to the infrastructure without applying them, helping to review before deployment.Click to reveal answer
intermediate
How do you securely provide Terraform variables and credentials in GitLab CI?
Use GitLab CI environment variables or GitLab's secret management to securely pass sensitive data to Terraform during pipeline execution.
Click to reveal answer
Which file is essential to configure Terraform jobs in GitLab CI?
✗ Incorrect
The .gitlab-ci.yml file defines the CI/CD pipeline including Terraform jobs.
What does the
terraform init command do in a GitLab CI pipeline?✗ Incorrect
terraform init prepares the working directory by downloading providers and setting up backend.Why is remote state storage recommended in GitLab CI pipelines using Terraform?
✗ Incorrect
Remote state storage prevents conflicts and allows team collaboration.
How can sensitive Terraform variables be securely passed in GitLab CI?
✗ Incorrect
Protected environment variables keep sensitive data secure during pipeline runs.
What is the main benefit of running
terraform plan before terraform apply in GitLab CI?✗ Incorrect
terraform plan helps review changes to avoid mistakes.Explain how Terraform integrates with GitLab CI to automate infrastructure deployment.
Think about the pipeline steps and how Terraform commands fit in.
You got /4 concepts.
Describe best practices for managing Terraform state and secrets in GitLab CI pipelines.
Focus on security and collaboration aspects.
You got /4 concepts.