test-changes

Run terraform fmt, validate, and plan against a test environment.

3.9k|557|Updated Jul 30, 2021
One-click install
npx skills add https://github.com/mysticaltech/terraform-hcloud-kube-hetzner --skill test-changes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-changes
Source: https://github.com/mysticaltech/terraform-hcloud-kube-hetzner/tree/main/.claude/skills/test-changes
Command: npx skills add https://github.com/mysticaltech/terraform-hcloud-kube-hetzner --skill test-changes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually validating Terraform changes is error-prone and time-consuming. This skill automates formatting, syntax validation, and plan generation against a dedicated test environment to catch issues early.

Core Features & Use Cases

  • Format Check: Runs terraform fmt -recursive to enforce consistent formatting across the module.
  • Validate & Plan: Executes terraform validate followed by terraform init -upgrade and terraform plan to surface necessary changes before applying.
  • Use Case: When modifying a module, run this skill to quickly verify formatting, syntax correctness, and the set of planned changes in a safe test environment.

Quick Start

Use the /test-changes command to run the full validation workflow against your test environment.

Frequently Asked Questions about test-changes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate terraform fmt, validate, and plan checks for my IaC modules?

You can validate Terraform changes before deployment by running terraform fmt, terraform validate, and terraform plan against a dedicated test environment. This ensures formatting, syntax correctness, and planned changes are auditable.

What is the best way to validate Terraform changes before deployment in a CI pipeline?

The best way to validate Terraform changes before deployment is running terraform fmt, terraform validate, and terraform plan against a test environment. This enforces safe, auditable changes by catching formatting and syntax issues early in local development or CI pipelines.

Does this Terraform validation workflow run terraform init -upgrade during the plan phase?

Yes, the Terraform validation workflow runs terraform init -upgrade during the plan phase. It enforces terraform fmt, terraform validate, terraform init -upgrade, and terraform plan steps sequentially to surface necessary changes before applying them.

Can I use this automated Terraform formatting and validation in local development?

Yes, you can use this automated Terraform formatting and validation in local development. It is applicable to Terraform modules in local development and CI pipelines to ensure formatting, syntax correctness, and planned changes against a dedicated test cluster.

Why should I run terraform fmt -recursive before terraform validate and plan?

You should run terraform fmt -recursive before terraform validate and plan to enforce consistent formatting across the module. Manually validating Terraform changes is error-prone, so automating formatting first surfaces syntax correctness and planned changes safely.