Recall & Review
beginner
What is the main purpose of using Terraform in GitHub Actions?
To automate infrastructure deployment and management directly from GitHub workflows, enabling continuous infrastructure as code.
Click to reveal answer
beginner
Which GitHub Actions step is used to initialize Terraform before applying changes?
The terraform init command initializes the working directory containing Terraform configuration files.
Click to reveal answer
intermediate
Why should Terraform state files be stored remotely when using GitHub Actions?
To allow multiple runs and team members to share the same state safely, preventing conflicts and ensuring consistent infrastructure state.
Click to reveal answer
beginner
What is the role of secrets in GitHub Actions when running Terraform workflows?
Secrets securely store sensitive data like cloud provider credentials, which are injected into workflows without exposing them in logs or code.
Click to reveal answer
beginner
How does the terraform plan step help in GitHub Actions workflows?
It previews the changes Terraform will make to the infrastructure, allowing review before applying to avoid unintended modifications.
Click to reveal answer
What command should run first in a Terraform GitHub Actions workflow?
✗ Incorrect
Terraform initialization sets up the working directory and downloads required providers before any other commands.
Where should Terraform state files be stored for safe collaboration in GitHub Actions?
✗ Incorrect
Remote backends allow shared access and locking to prevent state conflicts.
How do you securely provide cloud credentials to Terraform in GitHub Actions?
✗ Incorrect
GitHub Secrets keep sensitive data safe and inject them securely during workflow runs.
What does the terraform apply command do in a GitHub Actions workflow?
✗ Incorrect
It executes the changes to create, update, or delete infrastructure resources.
Why include a terraform plan step before terraform apply?
✗ Incorrect
Planning helps review changes and avoid mistakes before applying.
Explain the typical steps in a GitHub Actions workflow that uses Terraform to deploy infrastructure.
Think about setup, review, and deployment phases.
You got /5 concepts.
Describe why storing Terraform state remotely is important when using GitHub Actions.
Consider collaboration and safety.
You got /4 concepts.