# FDEs taking Terraform Associate 004 should study state first

> HashiCorp's official path teaches modules first, yet on a client's systems the state file, which stores secrets in plain text, is usually what goes wrong first.

Original: https://fdetimes.net/en/books-courses/terraform-associate-004-state-before-modules/

Sierra's listing for a Forward Deployed Infrastructure Engineer asked for deep experience with AWS, Terraform and container orchestration, to deploy directly inside customer environments. According to Built In, the listing was taken down on August 12, 2026. At Banyan Software, Terraform sits squarely in the required qualifications for the Forward Deployed Engineer role.

For an FDE, Terraform is an everyday tool rather than a line to dress up a CV. You build infrastructure in someone else's cloud account, hand it over to their team, then come back to fix it when something breaks. The HashiCorp Certified: Terraform Associate (004) certification is a compact way to prove that skill.

The order in which you study it deserves some thought, though. The official path teaches modules before state, while on a client site the state file is usually the first thing to cause trouble.

## What does the 004 exam test?

HashiCorp both sets the exam and writes the study material. According to the official certification page, the exam lasts one hour, is taken online with a proctor, is in English, and the certification is valid for two years. On Credly, the badge is listed under the issuer IBM Professional Certification.

A DEV Community post published on November 10, 2025 said version 004 was scheduled to replace version 003 from January 8, 2026. The official 004 Learning Path states that the exam is based on Terraform 1.12. When you practice, install that exact version so the syntax in the questions matches what you type.

The Learning Path runs in this order: IaC, fundamentals, the core workflow and configuration, then "Use and create modules", followed by state management, maintenance and HCP Terraform. That sequence makes sense for teaching the language. It does not match the real risks you meet at a client.

## Why state should come before modules

In its state section, the Learning Path explains that each time you apply a configuration, Terraform creates a state file that maps the resources actually running to your configuration.

HashiCorp's documentation adds a worrying detail: state is stored in plain text, unencrypted, and contains every secret value you have declared in your configuration.

By default, each workspace's state is a terraform.tfstate file on the local machine. HashiCorp recommends storing state in HCP Terraform or a remote backend, both for safety and so a whole team can work on it.

Take a hypothetical case. You build a database for a client from your own laptop, and the admin password is in the configuration. After the demo, the state file on your machine holds that password in unencrypted plain text, while the client's team has no copy to carry on from.

Objective group 6 of the exam targets exactly this kind of incident. It covers the local backend, state locking, configuring remote state with the backend block, and resource drift. Objective 2d in the fundamentals section also asks how Terraform uses and manages state, so study the two together, before you write your first module.

**Key point:** On a client's systems, secure the state file before you write your first line of elegant code.

## Modules: few levels, no thin wrappers

Objective group 5 has four items: where Terraform sources modules from, variable scope inside modules, how to use modules in a configuration, and module version management. The exam asks about mechanics. To learn how modules should be written, you need HashiCorp's design documentation.

Two rules are worth keeping. HashiCorp discourages writing modules that are merely thin wrappers around a single resource type. In its section on module composition, it also strongly recommends that in most cases the module tree be flat, with only one level of child modules.

Apply those two rules to a nested module tree. Before the change, the bucket module wraps a single resource and sits three levels deep:

```
root
└── module "app"
    └── module "storage"
        └── module "bucket"   # wraps a single resource
```

After the change, the bucket module is folded into storage, and root calls each child module directly:

```
root
├── module "network"
├── module "database"
└── module "storage"   # bucket plus its related resources
```

Each extra level of nesting adds a layer of variables and outputs that readers must trace, which is precisely the variable-scope material in objective 5b. In the second tree, a bucket parameter travels exactly one level down from root, so the client's team can change it without opening three directories.

For an FDE, this decides whether the handover goes smoothly, because the client's team has to read the code after you leave. Pinning module versions (objective 5d) also protects the client from an unexpected update breaking their infrastructure.

## Mistakes to avoid before your first apply

The first mistake to avoid follows directly from state being plain text: committing terraform.tfstate to git. Anyone with read access to the repo can then read the passwords in the state. Add the file to .gitignore from the very first commit and move state to a remote backend.

The second is running apply without state locking enabled. On a client project you are rarely the only person running Terraform. Without a lock, two applies running at the same time can overwrite each other's state.

The third is ignoring drift, the gap between state and the resources actually running. This is also an item in group 6. Before changing infrastructure that someone else has touched, run plan, read the differences carefully, and only then decide whether to apply.

## What is new in 004, and the order to study it

The Exam Content List flags the topics that are new since 003: the lifecycle rules depends_on and create_before_destroy, custom conditions, ephemeral values and write-only arguments, and workspaces and projects in HCP Terraform. If you are revising from old 003 material, these are the gaps to fill.

The order to follow: a quick review of the core workflow, then objective 2d and group 6 on state, and a trial remote backend with locking. Only then move on to group 5 on modules. Save the new 004 topics for the final week.

Read about ephemeral values and write-only arguments alongside the documentation page on sensitive data, since both concern secret values in configuration.

On the job-application side, the certification is only the foundation. When reading FDE listings, look for the phrases "Infrastructure-as-Code" or "customer environments". In your CV, describe a time you moved state from local to a remote backend or flattened a module tree, and spell out what you did so another team could carry on.

The badge expires after two years. The habit of putting state somewhere safe before you apply goes with you to every client deployment.

**Try this week:**

- Read objective 2d and objective group 6 in the 004 Exam Content List carefully. Then configure a backend block yourself for a small project to store state remotely and enable locking.
- Open the terraform.tfstate file of a test project and find the secret values sitting in plain text. Write down how you would protect them when working on a client's systems.
- Draw the module tree of a project you have written. Fold in the modules that wrap only one resource and flatten the tree to a single child level.

## Sources

- [HashiCorp Certified: Terraform Associate (004)](https://www.credly.com/org/ibm-professional-certification-program/badge/hashicorp-certified-terraform-associate-004)

- [Terraform Associate (004)](https://developer.hashicorp.com/certifications/terraform-associate)

- [The Terraform Associate 003 exam will be replaced by the Terraform Associate 004 exam version on January 8, 2026](https://dev.to/thukhakyawe_cloud/the-terraform-associate-003-exam-will-be-replaced-by-the-terraform-associate-004-exam-version-on-423m)

- [Learning Path - Terraform Associate 004](https://developer.hashicorp.com/terraform/tutorials/certification-004/associate-study-004)

- [Exam Content List - Terraform Associate 004](https://developer.hashicorp.com/terraform/tutorials/certification-004/associate-review-004)

- [State | Terraform | HashiCorp Developer](https://developer.hashicorp.com/terraform/language/state)

- [Manage sensitive data in your configuration | Terraform | HashiCorp Developer](https://developer.hashicorp.com/terraform/language/state/sensitive-data)

- [Creating Modules | Terraform | HashiCorp Developer](https://developer.hashicorp.com/terraform/language/modules/develop)

- [Module Composition | Terraform | HashiCorp Developer](https://developer.hashicorp.com/terraform/language/modules/develop/composition)

- [Forward Deployed Infrastructure Engineer](https://builtin.com/job/forward-deployed-infrastructure-engineer/9769023)

- [Job Application for Forward Deployed Engineer at Banyan Software](https://job-boards.greenhouse.io/banyansoftware/jobs/5293509007)
