Question · NestJS course · Module 12: Containers and CI/CD

Terraform state - state management

Why should you NOT store terraform.tfstate in a Git repository?

Answer options

  • It contains sensitive data (passwords, keys) and doesn't support shared access locking
  • The file is too large for Git
  • Git doesn't support .tfstate files
  • Terraform automatically deletes the file after apply

You can check the correct answer by solving this task in the CodeWorlds game.