Which of the following Terraform files should be ignored by Git when committing code to a repo? (select two)

Posted by: Pdfprep Category: VA-002-P Tags: , ,

Which of the following Terraform files should be ignored by Git when committing code to a repo? (select two)
A . output.tf
B . terraform.tfstate
C . terraform.tfvars
D . variables.tf

Answer: B,C

Explanation:

The .gitignore file should be configured to ignore Terraform files that either contain sensitive data or aren’t required to save.

The terraform.tfstate file contains the terraform state of a specific environment and doesn’t need to be preserved in a repo. The terraform.tfvars file may contain sensitive data, such as passwords or IP addresses of an environment that you may not want to share with others.

Leave a Reply

Your email address will not be published.