Complete the code to initialize Terraform in the GitLab CI job.
terraform init [1]The -input=false flag disables interactive input, which is necessary for automated CI runs.
Complete the code to plan Terraform changes in GitLab CI.
terraform plan [1]The -out=plan.tfplan option saves the plan to a file for later use in apply.
Fix the error in the apply command to run non-interactively in GitLab CI.
terraform apply [1] plan.tfplanThe -auto-approve flag skips the approval prompt, allowing the apply to run automatically in CI.
Fill both blanks to configure the GitLab CI job to use Terraform with a backend and environment variables.
variables: TF_VAR_region: [1] TF_VAR_env: [2]
Setting TF_VAR_region to "us-east-1" and TF_VAR_env to "production" passes these values as variables to Terraform.
Fill all three blanks to complete the GitLab CI job stages for Terraform init, plan, and apply.
stages: - [1] - [2] - [3]
The stages should be init, then plan, then apply to follow Terraform workflow.