Terraform Test

by hashicorpf706481af9b8No license890 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 days ago

Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.

  1. f706481af9b8Currentcommit f706481Published Oct 8, 2026

Source and attribution

Source:hashicorp/agent-skillsinplugins/terraform/skills/terraform-testat commitf706481

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from hashicorp/agent-skills

Terraform Style Guide

hashicorp

Generates and reviews Terraform HCL code following HashiCorp's official style conventions and best practices.

DevOps & Cloud890updated 3 days ago

Terraform Stacks

hashicorp

Guides writing and validating HashiCorp Terraform Stacks configuration files for multi-environment infrastructure.

DevOps & Cloud890updated 3 days ago

Terraform Policy

hashicorp

Writes, tests and converts Terraform Policy files (.policy.hcl, .policytest.hcl) and Sentinel policies.

Software Development890updated 3 days ago

Refactor Module

hashicorp

Guides refactoring monolithic Terraform configurations into reusable, maintainable modules with migration and tests.

Software Development890updated 3 days ago

Provider Resources

hashicorp

Implement Terraform Provider resources and data sources using the Plugin Framework: CRUD operations, schema design, plan modifiers and validators, not-found handling, waiters for eventually consistent APIs, import support, resource design principles, and required acceptance test coverage. Use when adding or changing a resource or data source, deciding whether an API concept should be a resource, wiring a resource to the provider's configured client, handling drift or resource-not-found, or reviewing a resource implementation before submission.

Awaiting classification890updated 3 days ago

Provider Framework Migration

hashicorp

Guides migrating Terraform provider resources from Plugin SDKv2 to the Plugin Framework using a muxed provider.

Software Development890updated 3 days ago