nerdexam
HashiCorpHashiCorp

TA-002-P · Question #147

TA-002-P Question #147: Real Exam Question with Answer & Explanation

The correct answer is A: Files named exactly terraform.tfvars or terraform.tfvars.json.. {"question_number": 9, "question": "Which of the following Terraform files should be ignored by Git when committing code to a repo? (select Three)", "correct_answer": "A. terraform.tfvars / terraform.tfvars.json, B. .auto.tfvars / .auto.tfvars.json, D. terraform.tfstate", "explan

Understand Terraform basics

Question

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

Options

  • AFiles named exactly terraform.tfvars or terraform.tfvars.json.
  • BAny files with names ending in .auto.tfvars or .auto.tfvars.json.
  • Cinput.tf
  • Dterraform.tfstate
  • Eoutput.tf

Explanation

{"question_number": 9, "question": "Which of the following Terraform files should be ignored by Git when committing code to a repo? (select Three)", "correct_answer": "A. terraform.tfvars / terraform.tfvars.json, B. *.auto.tfvars / *.auto.tfvars.json, D. terraform.tfstate", "explanation": "These three file types should be added to .gitignore: (A) terraform.tfvars and terraform.tfvars.json often contain sensitive variable values like passwords or API keys; (B) *.auto.tfvars and *.auto.tfvars.json are automatically loaded by Terraform and may also contain secrets; (D) terraform.tfstate contains the full state of your infrastructure including sensitive resource attributes in plaintext. Regular configuration files like input.tf and output.tf define infrastructure structure and are safe to commit.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#Git ignore#Terraform state#Terraform variables#Best practices

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions