# Terraform 1 9

> Apply Terraform 1.9 language, CLI, state, testing, migration, and behaviour changes. Load for Terraform work targeting 1.9 or later when the model's knowledge may predate the 2024-06-26 release.

- Skill: `cedws/terraform-1-9` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add cedws/terraform-1-9`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cedws/terraform-1-9/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: cedws (https://skillmd.com/u/cedws)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cedws/terraform-1-9

---


# Terraform 1.9

This overview applies when the project's target Terraform version is at least 1.9.

## Expressions and validation

- Input-variable validation conditions can refer to other input variables, data resources, and other objects in the same module. This permits cross-field and environment-aware validation.
- `templatestring(template, vars)` renders template text obtained dynamically, complementing `templatefile` for templates loaded from a data source or other expression.

```hcl
variable "min_size" {
  type = number
}

variable "max_size" {
  type = number

  validation {
    condition     = var.max_size >= var.min_size
    error_message = "max_size must not be smaller than min_size."
  }
}
```

## CLI and testing

- `terraform init -json` emits machine-readable UI output for automation.
- Interactive `terraform console` accepts multi-line expressions when delimiters remain open.
- Terraform tests can pass dynamically sensitive values to variables without requiring a static `sensitive = true` declaration on the receiving variable.
- A `moved` block can migrate `null_resource` instances to the built-in `terraform_data` resource type.

