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-change3description: 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<!-- Generated from harness/github-copilot/plugins/open-horizons-platform/skills/open-horizons-terraform-change/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Open Horizons Terraform change910Make one reviewable Terraform change while preserving provider, backend, import, and state boundaries.1112## When to invoke1314- Add, repair, or refactor a module under `terraform/modules/`.15- Change one isolated root under `terraform/environments/`.16- Update provider constraints, imports, variables, outputs, or module wiring.17- Prepare validation evidence or an explicitly approved remote plan without applying it.1819## Inputs2021Use `$ARGUMENTS` to identify the target module or environment root and requested behavior. Require22acceptance criteria, expected deployment context, and any known state or import relationship.23Require exact approval before a plan may contact a remote backend or provider API.2425## Procedure26271. Resolve the smallest owning path. Classify it as a reusable module or one isolated environment28 root; do not silently widen work to the guarded greenfield root at `terraform/`.292. Read the target's `main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`, callers, nearest30 `.terraform.lock.hcl`, backend declaration, import or moved blocks, and corresponding tests.313. Record the Terraform version constraint, provider constraints, lock-file owner, backend mode,32 state owner, imported addresses, and whether any resource address could change.334. Prefer an existing module and its public inputs or outputs over duplicating resources. Keep34 secrets outside Terraform source and variable files.355. Preserve checked-in provider selections. Use `-lockfile=readonly` when the resolved root owns a36 lock file; never regenerate a lock file unless the requested change explicitly changes provider37 dependencies.386. Treat backend, import, and address changes as state-sensitive. Use declarative `import` or39 `moved` blocks only when the requested adoption or address transition is explicit and reviewable;40 never mutate state to make configuration appear valid.417. Format the bounded path, initialize only the resolved root with the backend disabled, and42 validate it:4344 ```bash45 terraform fmt -check -recursive <target>46 terraform -chdir=<resolved-root> init -backend=false -input=false -lockfile=readonly47 terraform -chdir=<resolved-root> validate48 ```4950 If the resolved root has no checked-in lock file, omit `-lockfile=readonly`, explain why, and do51 not commit an incidental lock file.528. Select `terratest-module-testing` mode: `static` by default, `plan` only when plan behavior is53 acceptance-critical, or `integration` only through that skill's complete approval gate.549. Run a remote plan only after approval names the exact root, environment, backend or state,55 variable inputs, command, and allowed network context. Save a plan only when requested; do not56 print secrets or treat the plan as deployment approval.5710. Report changed paths, versions, backend and state risk, validation, optional saved-plan58 identity, and security or deployment handoffs.5960## Saved-plan identity6162When a saved plan is approved, record its repository-relative path, SHA-256 digest, resolved root,63Terraform version, creation timestamp, sanitized command, target environment, and backend/state64identity. Never commit the plan or expose variable values embedded in it.6566## Output template6768```markdown69## Terraform change result7071**Status:** completed | blocked72**Scope:** <module or isolated environment root>73**Terraform/provider versions:** <constraints and lock owner>74**Backend/state risk:** none | low | high - <reason>7576### Changes77- `<path>`: <bounded behavior>7879### Validation80| Command or check | Result | Evidence |81| --- | --- | --- |8283### Saved plan84- Identity: <path, digest, root, environment, version, timestamp, or not created>8586### Handoffs87- Security review: <required and reason | not required>88- Deployment operation: <immutable package needed | not requested>89```9091## Limits9293- Never run `terraform apply`, `destroy`, `state`, `force-unlock`, or `init -upgrade`.94- Never migrate a backend or state, import through a state command, or substitute a live workspace.95- Never infer remote-plan approval from a dry run, issue label, previous plan, or test result.96- Do not combine unrelated modules or environment roots into one change.9798## Related primitives99100| Name | Type | Use it when |101| --- | --- | --- |102| `terraform-cli` | `skill` | Exact safe Terraform CLI syntax or diagnostic handling is needed. |103| `terratest-module-testing` | `skill` | Tests must be created, repaired, or run in a selected mode. |104| `open-horizons-azure-readiness` | `skill` | Current Azure prerequisites require read-only assessment. |105| `open-horizons-security-reviewer` | `agent` | Identity, exposure, secrets, policy, or state risk needs independent review. |106| `open-horizons-deployment-operation` | `skill` | An immutable approved plan is ready for a separate deployment owner. |107108## Quality gate109110- [ ] The exact root or module, callers, version, lock, backend, import, and state boundaries are known.111- [ ] Existing modules and public contracts were preferred over duplicate infrastructure.112- [ ] Formatting, backend-disabled initialization, validation, and the selected Terratest mode are evidenced.113- [ ] Any remote plan had exact approval and any saved plan has a sanitized immutable identity.114- [ ] No apply, destroy, state mutation, backend migration, force unlock, or provider upgrade ran.115- [ ] Security and deployment handoffs are explicit.
Run npx skillmds@latest add paulasilvatech/open-horizons-terraform-change 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.