hashicorp/agent-skills▌
15 approved skills in this repository
push-to-registry
Productivity
Push Packer build metadata to HCP Packer registry for image lifecycle tracking and governance. \n \n Registers build artifacts in HCP Packer with minimal overhead, storing metadata only (not actual images) and adding less than one minute to build time \n Supports bucket-level labels (updated per build) and immutable build-level labels (git SHA, timestamps) for version control and compliance tracking \n Integrates with Terraform via hcp_packer_artifact data source to query and deploy images acros
run-acceptance-tests
Testing
Execute and diagnose Go acceptance tests for Terraform providers with structured troubleshooting. \n \n Run focused acceptance tests using go test -run=TestAccFeatureHappyPath with TF_ACC=1 environment variable \n Diagnose failures progressively: retry with -count=1 , enable verbose output with -v , activate debug logging via TF_LOG=debug , and persist Terraform workspace with TF_ACC_WORKING_DIR_PERSIST=1 \n Validate test reliability by intentionally breaking a TestCheckFunc, re-running the test
new-terraform-provider
Cloud
Scaffold a new Terraform provider using the Plugin Framework. \n \n Generates a new Go module workspace with the standard \"terraform-provider-\" naming convention and initializes required dependencies \n Provides a template main.go file following HashiCorp's Plugin Framework patterns, with TODO markers for customization \n Validates the setup by running build and test commands to ensure the provider compiles and passes initial checks \n Handles workspace management by confirming intent before c
refactor-module
Productivity
Break monolithic Terraform configurations into reusable, well-structured modules with clear contracts and migration paths. \n \n Analyzes existing code to identify refactoring candidates, groups resources by logical function, and assesses complexity before design \n Generates module interfaces with typed variables, validation rules, and descriptive outputs following HashiCorp best practices \n Provides state migration strategies using moved blocks (Terraform 1.1+) or manual terraform state mv co
provider-test-patterns
Testing
Patterns for writing acceptance tests using terraform-plugin-testing with the Plugin Framework.
windows-builder
Frontend
Platform-agnostic patterns for building Windows images with Packer.
terraform-search-import
Cloud
Discover existing cloud resources using declarative queries and generate configuration for bulk import into Terraform state.
aws-ami-builder
Cloud
Build custom Amazon Machine Images with Packer's amazon-ebs builder. \n \n Automates AMI creation from source AMIs using HCL templates with provisioners for customization (shell scripts, file uploads, configuration management) \n Supports multi-region AMI distribution via ami_regions and flexible source AMI filtering by name, owner, and virtualization type \n Authenticates via environment variables, AWS credentials file, or IAM instance profiles; includes validation and build commands for templa
azure-image-builder
Cloud
Build Azure managed images and Azure Compute Gallery images using Packer's azure-arm builder.
provider-actions
Productivity
Implement imperative Terraform Provider actions at resource lifecycle events using the Plugin Framework. \n \n Supports before/after create and before/after update lifecycle triggers (destroy events not available in Terraform 1.14.0) \n Requires proper schema definition with correct framework types, ElementType for collections, and validators for input validation \n Includes progress reporting, timeout management, and comprehensive error handling for long-running operations \n Implements polling
azure-verified-modules
Cloud
Certification requirements and best practices for Azure Terraform modules seeking AVM compliance. \n \n Enforces provider version constraints (azurerm >= 4.0, < 5.0; azapi >= 2.0, < 3.0) and prohibits git-based module references in favor of pinned Terraform registry sources \n Mandates lower snake_casing for all identifiers, precise variable types, discrete output attributes via anti-corruption layer pattern, and alphabetically ordered locals \n Requires feature toggle variables for ne
provider-resources
Productivity
Implement Terraform Provider resources and data sources with complete CRUD operations and testing. \n \n Covers both SDKv2 and Plugin Framework patterns for resource implementation, including schema design, plan modifiers, and validators \n Provides complete CRUD operation examples (Create, Read, Update, Delete) with error handling, state management, and resource not-found patterns \n Includes acceptance testing patterns: basic tests, disappears tests, helper functions, and test execution comman
terraform-stacks
Cloud
$23
terraform-test
Cloud
Comprehensive guide for writing and running Terraform tests with assertions, mocking, and module validation. \n \n Write test files using .tftest.hcl syntax with run blocks that execute in plan or apply mode, supporting sequential and parallel execution with optional state isolation \n Assert conditions on resource attributes, outputs, and data sources; use expect_failures to validate that invalid inputs are properly rejected \n Mock providers (Terraform 1.7.0+) simulate infrastructure behavior
terraform-style-guide
Cloud
Generate and maintain Terraform code following HashiCorp's official style conventions. \n \n Enforces two-space indentation, lowercase underscore naming, and standard file organization across terraform.tf , providers.tf , main.tf , variables.tf , outputs.tf , and locals.tf \n Requires type and description on all variables and outputs, with validation rules and sensitive flag support for credentials \n Prioritizes for_each over count for dynamic resources, applies security hardening (encryption,