Terraform Infrastructure as Code Agent Skills: Complete Guide to HashiCorp Official Tools
The VoltAgent/awesome-agent-skills repository provides eleven official HashiCorp-maintained agent skills that automate Terraform infrastructure as code workflows, including provider scaffolding, resource importing, module refactoring, and compliance testing.
The VoltAgent/awesome-agent-skills repository catalogs official capabilities that AI agents can use to manage Terraform infrastructure as code. According to the source code in README.md (lines 666–676), these skills cover the complete lifecycle—from authoring custom providers and modules to importing existing cloud resources and enforcing HashiCorp style conventions.
Provider Development Skills
The following skills in the repository target Terraform provider authoring using the official Plugin Framework and testing libraries.
new-terraform-provider
new-terraform-provider scaffolds a brand-new Terraform provider project using the official Plugin Framework. As documented at line 667, this skill generates the initial Go project structure including go.mod, main.go, and plugin scaffolding boilerplate.
provider-resources
provider-resources demonstrates how to implement resources and data sources inside a Terraform provider. Located at line 668, this skill guides agents through the Plugin Framework patterns for defining CRUD operations and schema attributes.
provider-actions
provider-actions details how to add custom CLI commands to a Terraform provider via the Plugin Framework. According to line 670, this skill enables providers to expose functionality beyond standard resource management.
provider-test-patterns
provider-test-patterns supplies accepted testing patterns using terraform-plugin-testing. Referenced at line 669, this skill ensures providers follow HashiCorp’s validation and acceptance testing standards.
run-acceptance-tests
run-acceptance-tests automates the execution of acceptance tests for a provider with Go’s test runner. As noted at line 671, it handles test state, parallelism, and cleanup automatically.
Module and Infrastructure Management
These skills focus on module certification, configuration refactoring, and multi-environment orchestration.
azure-verified-modules
azure-verified-modules provides guidance for building Terraform modules that meet the Azure Verified Modules (AVM) certification standards. Documented at line 666, this skill ensures modules comply with Microsoft Azure’s publishing requirements.
refactor-module
refactor-module guides the transformation of large, monolithic Terraform configurations into reusable, composable modules. Located at line 672, this skill helps agents split infrastructure code into maintainable components.
terraform-stacks
terraform-stacks helps manage multi-environment, multi-region, and multi-account infrastructure by orchestrating stacks of Terraform workspaces. According to line 675, this skill handles complex deployment topologies.
Import and Compliance Automation
These skills address brownfield resource adoption, code formatting, and native testing.
terraform-search-import
terraform-search-import discovers existing cloud resources and generates bulk terraform import statements. As implemented at line 673, this skill brings unmanaged resources under Terraform control by producing ready-to-run import commands.
terraform-style-guide
terraform-style-guide generates Terraform HCL that conforms to HashiCorp’s official style conventions. Referenced at line 674, this skill enforces naming, formatting, and attribute ordering standards.
terraform-test
terraform-test provides a built-in testing framework for Terraform configurations using .tftest.hcl files. Documented at line 676, this skill enables native infrastructure testing without external tools.
Practical Implementation Examples
The following examples demonstrate how agents invoke these skills against the officialskills.sh HashiCorp endpoint. These assume a Claude-compatible agent capable of resolving skill URLs.
Scaffold a New Provider
# Prompt to the agent
Create a new Terraform provider for the fictional service “AcmeAPI”.
Agent response:
# The agent invokes the new-terraform-provider skill
curl -s https://officialskills.sh/hashicorp/skills/new-terraform-provider \
-d '{"provider_name":"acmeapi","language":"go"}' > acmeapi-provider
This produces a ready-to-run Go project with Plugin Framework scaffolding.
Bulk-Import Existing Resources
# Prompt
I have an AWS VPC with ID vpc-12345 that already exists. Generate Terraform import commands for it and all its sub-resources.
Agent response:
curl -s https://officialskills.sh/hashicorp/skills/terraform-search-import \
-d '{"cloud":"aws","resource_type":"vpc","resource_id":"vpc-12345"}' \
| tee import_commands.sh
The resulting import_commands.sh contains terraform import statements for the VPC, subnets, and route tables.
Enforce Style on Existing HCL
# Prompt
Reformat my main.tf to follow HashiCorp’s style guide.
Agent response:
curl -s https://officialskills.sh/hashicorp/skills/terraform-style-guide \
-d '{"file_path":"./main.tf"}' > formatted_main.tf
The returned file respects official naming conventions, indentation, and attribute ordering.
Run Provider Acceptance Tests
# Prompt
Run the acceptance tests for the acmeapi provider I just generated.
Agent response:
curl -s https://officialskills.sh/hashicorp/skills/run-acceptance-tests \
-d '{"provider_path":"./acmeapi-provider"}' \
| go test ./...
All acceptance tests execute with proper state handling and cleanup.
Key Repository Files
README.md: Located at the repository root, this file contains the canonical list of Terraform skills at lines 666–676. It serves as the primary discovery mechanism and links to each skill definition.opencode.json: Contains metadata used by the OpenCode platform to index skills. This file is essential for automated skill discovery but is not directly edited by end users.
Both files reside in the main branch of VoltAgent/awesome-agent-skills.
Summary
- Eleven official skills are available for Terraform infrastructure as code, covering provider development, module certification, resource importing, and style enforcement.
- Provider development skills (
new-terraform-provider,provider-resources,provider-actions,provider-test-patterns,run-acceptance-tests) automate the Plugin Framework lifecycle from scaffolding to testing. - Infrastructure management skills (
terraform-search-import,refactor-module,terraform-stacks) handle brownfield adoption and configuration modularization. - Compliance and testing skills (
azure-verified-modules,terraform-style-guide,terraform-test) enforce HashiCorp standards and native HCL testing frameworks. - Source locations for all skills are documented in
README.mdlines 666–676 of the VoltAgent/awesome-agent-skills repository.
Frequently Asked Questions
How do I invoke these Terraform agent skills in my workflow?
Agents invoke these skills by making HTTP requests to the HashiCorp skills endpoint (officialskills.sh/hashicorp/skills/) with the appropriate skill name and JSON payload. The agent handles the curl commands and parameter construction automatically when you prompt it with tasks like "scaffold a new provider" or "import existing AWS resources."
What is the difference between provider-test-patterns and terraform-test?
provider-test-patterns focuses on acceptance testing for custom Terraform providers using the Go-based terraform-plugin-testing framework, while terraform-test targets native testing of Terraform configurations using .tftest.hcl files. Use the former when building providers in Go, and the latter when validating module configurations written in HCL.
Can these skills help me import resources from multiple cloud providers?
Yes. The terraform-search-import skill supports discovering and generating import statements for resources across different cloud providers. You specify the cloud platform (e.g., AWS, Azure, GCP) and resource identifiers in the request payload, and the skill returns the appropriate terraform import commands for that provider's resource types.
Where are these skills officially documented?
The canonical documentation resides in the README.md file of the VoltAgent/awesome-agent-skills repository, specifically in the section titled "Skills by HashiCorp team for Terraform" at lines 666–676. The opencode.json file at the repository root also contains machine-readable metadata used by the OpenCode platform for skill indexing and discovery.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →