Implements and validates one bounded Open Horizons Terraform change in terraform/modules or an isolated terraform/environments root. Use when changing a module, environment root, provider constraint, backend declaration, import block, or state-aware Terraform contract without applying infrastructure.
Make one reviewable Terraform change while preserving provider, backend, import, and state boundaries.
When to invoke
Add, repair, or refactor a module under terraform/modules/.
Change one isolated root under terraform/environments/.
Update provider constraints, imports, variables, outputs, or module wiring.
Prepare validation evidence or an explicitly approved remote plan without applying it.
Inputs
Use $ARGUMENTS to identify the target module or environment root and requested behavior. Require
acceptance criteria, expected deployment context, and any known state or import relationship.
Require exact approval before a plan may contact a remote backend or provider API.
Procedure
Resolve the smallest owning path. Classify it as a reusable module or one isolated environment
root; do not silently widen work to the guarded greenfield root at terraform/.
Read the target's main.tf, variables.tf, outputs.tf, versions.tf, callers, nearest
.terraform.lock.hcl, backend declaration, import or moved blocks, and corresponding tests.
Record the Terraform version constraint, provider constraints, lock-file owner, backend mode,
state owner, imported addresses, and whether any resource address could change.
Prefer an existing module and its public inputs or outputs over duplicating resources. Keep
secrets outside Terraform source and variable files.
Preserve checked-in provider selections. Use -lockfile=readonly when the resolved root owns a
lock file; never regenerate a lock file unless the requested change explicitly changes provider
dependencies.
Treat backend, import, and address changes as state-sensitive. Use declarative import or
moved blocks only when the requested adoption or address transition is explicit and reviewable;
never mutate state to make configuration appear valid.
Format the bounded path, initialize only the resolved root with the backend disabled, and
validate it:
If the resolved root has no checked-in lock file, omit -lockfile=readonly, explain why, and do
not commit an incidental lock file.
Select terratest-module-testing mode: static by default, plan only when plan behavior is
acceptance-critical, or integration only through that skill's complete approval gate.
Run a remote plan only after approval names the exact root, environment, backend or state,
variable inputs, command, and allowed network context. Save a plan only when requested; do not
print secrets or treat the plan as deployment approval.
Report changed paths, versions, backend and state risk, validation, optional saved-plan
identity, and security or deployment handoffs.
Saved-plan identity
When a saved plan is approved, record its repository-relative path, SHA-256 digest, resolved root,
Terraform version, creation timestamp, sanitized command, target environment, and backend/state
identity. Never commit the plan or expose variable values embedded in it.
Output template
## Terraform change result
**Status:** completed | blocked
**Scope:** <module or isolated environment root>
**Terraform/provider versions:** <constraints and lock owner>
**Backend/state risk:** none | low | high - <reason>
### Changes
- `<path>`: <bounded behavior>
### Validation
| Command or check | Result | Evidence |
| --- | --- | --- |
### Saved plan
- Identity: <path, digest, root, environment, version, timestamp, or not created>
### Handoffs
- Security review: <required and reason | not required>
- Deployment operation: <immutable package needed | not requested>
Limits
Never run terraform apply, destroy, state, force-unlock, or init -upgrade.
Never migrate a backend or state, import through a state command, or substitute a live workspace.
Never infer remote-plan approval from a dry run, issue label, previous plan, or test result.
Do not combine unrelated modules or environment roots into one change.
Related primitives
Name
Type
Use it when
terraform-cli
skill
Exact safe Terraform CLI syntax or diagnostic handling is needed.
terratest-module-testing
skill
Tests must be created, repaired, or run in a selected mode.
open-horizons-azure-readiness
skill
Current Azure prerequisites require read-only assessment.
open-horizons-security-reviewer
agent
Identity, exposure, secrets, policy, or state risk needs independent review.
open-horizons-deployment-operation
skill
An immutable approved plan is ready for a separate deployment owner.
Quality gate
The exact root or module, callers, version, lock, backend, import, and state boundaries are known.
Existing modules and public contracts were preferred over duplicate infrastructure.
Formatting, backend-disabled initialization, validation, and the selected Terratest mode are evidenced.
Any remote plan had exact approval and any saved plan has a sanitized immutable identity.
No apply, destroy, state mutation, backend migration, force unlock, or provider upgrade ran.
Security and deployment handoffs are explicit.
1---2name: open-horizons-terraform-change-23description: Implements and validates one bounded Open Horizons Terraform change in terraform/modules or an isolated terraform/environments root. Use when changing a module, environment root, provider constraint, backend declaration, import block, or state-aware Terraform contract without applying infrastructure.4---56# Open Horizons Terraform change78Make one reviewable Terraform change while preserving provider, backend, import, and state boundaries.910## When to invoke1112- Add, repair, or refactor a module under `terraform/modules/`.13- Change one isolated root under `terraform/environments/`.14- Update provider constraints, imports, variables, outputs, or module wiring.15- Prepare validation evidence or an explicitly approved remote plan without applying it.1617## Inputs1819Use `$ARGUMENTS` to identify the target module or environment root and requested behavior. Require20acceptance criteria, expected deployment context, and any known state or import relationship.21Require exact approval before a plan may contact a remote backend or provider API.2223## Procedure24251. Resolve the smallest owning path. Classify it as a reusable module or one isolated environment26 root; do not silently widen work to the guarded greenfield root at `terraform/`.272. Read the target's `main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`, callers, nearest28 `.terraform.lock.hcl`, backend declaration, import or moved blocks, and corresponding tests.293. Record the Terraform version constraint, provider constraints, lock-file owner, backend mode,30 state owner, imported addresses, and whether any resource address could change.314. Prefer an existing module and its public inputs or outputs over duplicating resources. Keep32 secrets outside Terraform source and variable files.335. Preserve checked-in provider selections. Use `-lockfile=readonly` when the resolved root owns a34 lock file; never regenerate a lock file unless the requested change explicitly changes provider35 dependencies.366. Treat backend, import, and address changes as state-sensitive. Use declarative `import` or37 `moved` blocks only when the requested adoption or address transition is explicit and reviewable;38 never mutate state to make configuration appear valid.397. Format the bounded path, initialize only the resolved root with the backend disabled, and40 validate it:4142 ```bash43 terraform fmt -check -recursive <target>44 terraform -chdir=<resolved-root> init -backend=false -input=false -lockfile=readonly45 terraform -chdir=<resolved-root> validate46 ```4748 If the resolved root has no checked-in lock file, omit `-lockfile=readonly`, explain why, and do49 not commit an incidental lock file.508. Select `terratest-module-testing` mode: `static` by default, `plan` only when plan behavior is51 acceptance-critical, or `integration` only through that skill's complete approval gate.529. Run a remote plan only after approval names the exact root, environment, backend or state,53 variable inputs, command, and allowed network context. Save a plan only when requested; do not54 print secrets or treat the plan as deployment approval.5510. Report changed paths, versions, backend and state risk, validation, optional saved-plan56 identity, and security or deployment handoffs.5758## Saved-plan identity5960When a saved plan is approved, record its repository-relative path, SHA-256 digest, resolved root,61Terraform version, creation timestamp, sanitized command, target environment, and backend/state62identity. Never commit the plan or expose variable values embedded in it.6364## Output template6566```markdown67## Terraform change result6869**Status:** completed | blocked70**Scope:** <module or isolated environment root>71**Terraform/provider versions:** <constraints and lock owner>72**Backend/state risk:** none | low | high - <reason>7374### Changes75- `<path>`: <bounded behavior>7677### Validation78| Command or check | Result | Evidence |79| --- | --- | --- |8081### Saved plan82- Identity: <path, digest, root, environment, version, timestamp, or not created>8384### Handoffs85- Security review: <required and reason | not required>86- Deployment operation: <immutable package needed | not requested>87```8889## Limits9091- Never run `terraform apply`, `destroy`, `state`, `force-unlock`, or `init -upgrade`.92- Never migrate a backend or state, import through a state command, or substitute a live workspace.93- Never infer remote-plan approval from a dry run, issue label, previous plan, or test result.94- Do not combine unrelated modules or environment roots into one change.9596## Related primitives9798| Name | Type | Use it when |99| --- | --- | --- |100| `terraform-cli` | `skill` | Exact safe Terraform CLI syntax or diagnostic handling is needed. |101| `terratest-module-testing` | `skill` | Tests must be created, repaired, or run in a selected mode. |102| `open-horizons-azure-readiness` | `skill` | Current Azure prerequisites require read-only assessment. |103| `open-horizons-security-reviewer` | `agent` | Identity, exposure, secrets, policy, or state risk needs independent review. |104| `open-horizons-deployment-operation` | `skill` | An immutable approved plan is ready for a separate deployment owner. |105106## Quality gate107108- [ ] The exact root or module, callers, version, lock, backend, import, and state boundaries are known.109- [ ] Existing modules and public contracts were preferred over duplicate infrastructure.110- [ ] Formatting, backend-disabled initialization, validation, and the selected Terratest mode are evidenced.111- [ ] Any remote plan had exact approval and any saved plan has a sanitized immutable identity.112- [ ] No apply, destroy, state mutation, backend migration, force unlock, or provider upgrade ran.113- [ ] Security and deployment handoffs are explicit.
Run npx skillmds@latest add paulasilvatech/open-horizons-terraform-change-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Implements and validates one bounded Open Horizons Terraform change in terraform/modules or an isolated terraform/environments root. Use when changing a module, environment root, provider constraint, backend declaration, import block, or state-aware Terraform contract without applying infrastructure. It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
paulasilvatech (@paulasilvatech) published this skill. Their other Agent Skills are listed on their SkillMD profile.