Skip to content
Back to skills

Terraform Changes

ASecurity

Plan and review Terraform/OpenTofu changes safely: state, plans, modules, drift and destructive changes

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentterraformgitdatabasedevops

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill terraform-changes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Terraform Changes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Terraform Changes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-terraform-changes/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-terraform-changes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Plan and review Terraform/OpenTofu changes safely: state, plans, modules, drift and destructive changes
profile: standard
tags: terraform, infrastructure, devops
---

# Terraform changes

Use when editing `.tf` files.

## Workflow
1. `terraform fmt -recursive` and `terraform validate`.
2. `terraform plan -out=plan.tfplan` in the right workspace/environment, and read every change. Pay special attention to `-/+` (replace) and `-` (destroy) on stateful resources: databases, buckets, volumes, DNS.
3. Summarize the plan for the user: counts of create/update/replace/destroy and every destructive item by name.
4. Apply only the reviewed plan file, and only with explicit user approval. Never run `terraform apply -auto-approve` or `terraform destroy` on your own.

## Avoid surprise replacements
- Renaming a resource or moving it into a module destroys and recreates it unless you add a `moved` block.
- Changing a `for_each` key or `count` index moves resources; prefer `for_each` with stable keys.
- Some argument changes force replacement; the plan says `# forces replacement`. Find another way or plan a migration.
- Use `lifecycle { prevent_destroy = true }` on critical stateful resources.

## Hygiene
- Pin provider and module versions; commit `.terraform.lock.hcl`.
- Remote state with locking. Never edit state by hand; use `terraform state mv` / `import` blocks.
- No secrets in `.tf` or `.tfvars` committed to git; use variables marked `sensitive` fed from a secret store.
- Run `tflint` / `checkov` / `tfsec` if the repo configures them.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.