
Description
Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.
SKILL.md
terraform-policy
UTILITY SKILL — INVOKES: tfpolicy-author | tfpolicy-test
USE FOR:
- Writing a new
.policy.hclpolicy from a description or requirement - Converting a
.sentinelpolicy to Terraform Policy - Writing or debugging a
.policytest.hcltest file - Migrating a Sentinel policy library to Terraform Policy
DO NOT USE FOR:
- Writing
.tftest.hclfiles for Terraform modules — useterraform-test - General Terraform HCL authoring — use
terraform-style-guide
Routing
| Task | Sub-skill |
|---|---|
Write or convert a .policy.hcl policy | tfpolicy-author |
Write or debug a .policytest.hcl test | tfpolicy-test |
Examples
- "Block EC2 instances without encryption" → tfpolicy-author
- "Convert this Sentinel policy to tfpolicy" → tfpolicy-author
- "Write a policytest for my EBS policy" → tfpolicy-test
Troubleshooting
- Wrong skill triggered? Load the sub-skill directly from the routing table above.
npx skills add hashicorp/agent-skills/terraform/terraform-policy/skills/tfpolicy-author
npx skills add hashicorp/agent-skills/terraform/terraform-policy/skills/tfpolicy-test
More skills from the agent-skills repository
View all 17 skillsaws-ami-builder
build Amazon Machine Images with Packer
Apr 6AWSDeploymentInfrastructure as CodePackerazure-image-builder
build Azure managed images with Packer
Apr 6AzureDeploymentPackerazure-verified-modules
develop certified Azure Verified Modules
Apr 6AzureComplianceInfrastructure as CodeTerraformnew-terraform-provider
scaffold new Terraform providers
Apr 6Plugin DevelopmentTemplatesTerraformprovider-actions
implement Terraform Provider lifecycle actions
Apr 6API DevelopmentPlugin DevelopmentTerraformprovider-docs
generate and review Terraform provider documentation
Apr 6DocumentationTechnical WritingTerraform
More from HashiCorp
View publisherprovider-resources
implement Terraform Provider resources and data sources
agent-skills
Apr 6API DevelopmentPlugin DevelopmentTerraformprovider-test-patterns
implement Terraform provider acceptance test patterns
agent-skills
Apr 6Plugin DevelopmentQATerraformTestingpush-to-registry
push Packer build metadata to HCP registry
agent-skills
Apr 6DeploymentGovernanceHCPPackerrefactor-module
refactor Terraform configurations into reusable modules
agent-skills
Apr 6ArchitectureInfrastructure as CodeTerraformrun-acceptance-tests
run acceptance tests for Terraform providers
agent-skills
Apr 6Plugin DevelopmentQATerraformTesting