Home » HashiCorp » Terraform Associate » Which of the following Terraform files should be ignored by Git when committing code to a repo?
Which of the following Terraform files should be ignored by Git when committing code to a repo?
(select Three)
A. Files named exactly terraform.tfvars or terraform.tfvars.json.
B. Any files with names ending in .auto.tfvars or .auto.tfvars.json.
C. input.tf
D. terraform.tfstate
E. output.tf
Correct Answer: ABD
Explanation/Reference:
Explanation:
The .gitignore file should be configured to ignore Terraform files that either contain sensitive data or are not required to save.
Terraform state (terraform.tfstate) can contain sensitive data, depending on the resources in use and your definition of “sensitive.” The state contains resource IDs and all resource attributes. For resources such as databases, this may contain initial passwords.
When using local state, state is stored in plain-text JSON files.
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.
Download Printable PDF. VALID exam to help you PASS.
|
|