Should you store the .terraform folder to version control?
Experience Level: Junior
Tags: Terraform
Answer
No, don't do it.
This folder contains backend configuration including any authentication parameters you provided to Terraform CLI. It may contain sensitive credentials for your remote backend.
Related Terraform job interview questions
What does 'terraform validate' command to in Terraform CLI?
Terraform JuniorTo keep Terraform configuration secure, you shouldn't hardcode credentials. How can you securely provide your backend configuration using Terraform CLI?
Terraform JuniorWhat is stored in .terraform folder?
Terraform JuniorWhat is a default backend in Terraform?
Terraform JuniorWhat do you need to know about Terraform state in relation to security?
Terraform Junior