NEW350+ rooms now have a live terminal, so you can learn by typing the commands, right in your browser.Learn in a live terminal. 350+ rooms.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
This module focuses on the most sensitive artifact in your Infrastructure as Code workflow: the Terraform state file. You will learn why state files contain plaintext credentials, how state leakage occurs through version control and CI/CD logs, and how to architect secure remote backends with encryption, locking, and strict access controls. We will cover Terraform's sensitive value handling, provider-level secret injection, and the safe use of HashiCorp Vault or AWS Secrets Manager instead of hardcoded values and .tfvars files. The module culminates in a hands-on guided lab where you will audit a leaking state configuration, migrate to a hardened remote backend, and remediate exposed credentials.
Each task’s Rep is set individually — intermediate tasks average +50. The +0 room bonus unlocks at 100%.
Frequently Asked Questions
Why is the Terraform state file sensitive?
State can contain resource attributes in plain text, including passwords, keys and connection strings. Anyone who can read it may gain access to your infrastructure, so it must be stored and shared securely.
How do you secure a remote Terraform backend?
Use an encrypted backend with versioning, strict access controls and state locking, and separate state per environment. Limit who can read or write it and log all access to detect misuse.
Does marking a variable sensitive protect it?
Marking a variable sensitive hides it from CLI output but does not remove it from state. You still need encrypted state and a secrets manager. The Codelivly room covers this and is free and hands-on.