terraform-policy

Author, test, and migrate Terraform Policy-as-Code files.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-policy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-policy
Source: https://github.com/kk0ga/terraform-aws-learning/tree/main/.agents/skills/terraform-policy
Command: npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-policy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation, testing, and migration of Terraform Policy-as-Code, removing the complexity of manual policy authoring and the friction of converting legacy Sentinel policies.

Core Features & Use Cases

  • Policy Authoring: Generate robust .policy.hcl files from natural language requirements.
  • Sentinel Conversion: Automatically translate legacy Sentinel or OPA/Rego policies into modern Terraform Policy syntax.
  • Testing & Debugging: Write and validate .policytest.hcl files to ensure policy compliance before deployment.

Quick Start

Use the terraform-policy skill to convert my existing Sentinel policy into a new Terraform Policy file.

Frequently Asked Questions about terraform-policy

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

FAQPage Schema
How do I convert legacy Sentinel policies to Terraform Policy syntax?

You can convert legacy Sentinel policies by using automated translation features to generate modern .policy.hcl files, removing the friction of manual policy migration for HCP Terraform enforcement.

What is the best way to write and test Terraform Policy-as-Code?

Writing and testing Terraform Policy-as-Code involves generating .policy.hcl files from requirements and validating them with .policytest.hcl files to ensure infrastructure guardrails comply with verified syntax standards before deployment.

Can I generate HCL policy files from natural language requirements?

Yes, you can generate robust .policy.hcl files directly from natural language requirements, streamlining the creation of complex policy logic for infrastructure compliance without manual coding.

How does .policytest.hcl validate infrastructure guardrails before deployment?

The .policytest.hcl format validates infrastructure guardrails by enabling you to write and run unit tests against your policies, ensuring compliance with HCP Terraform enforcement standards before any deployment occurs.

Do I need HCP Terraform to enforce .policy.hcl files?

Enforcing .policy.hcl files requires adherence to verified syntax standards for HCP Terraform policy enforcement, ensuring your infrastructure guardrails function correctly within the platform's compliance framework.

Can existing OPA or Rego policies be migrated to Terraform Policy syntax?

Existing OPA and Rego policies can be automatically translated into modern Terraform Policy syntax, eliminating the complexity of manual policy authoring and streamlining migration workflows.