terraform-policy
Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.
- License 许可
- MPL-2.0
- 最近更新
- 2026-10-04
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- terraform-policy
- license
- MPL-2.0
- metadata
- { "version": "0.1.0", "copyright": "Copyright IBM Corp. 2026" }
- description
- Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.
02 资源文件 57
- 参考文档evals/eval.yaml616 B
- 参考文档evals/tasks/negative-trigger-1.yaml346 B
- 参考文档evals/tasks/positive-trigger-1.yaml354 B
- 参考文档evals/tasks/positive-trigger-2.yaml356 B
- 其他examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.policy.hcl520 B
- 其他examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.sentinel1.6 KB
- 参考文档examples/conversion/cloudfront-associated-with-waf/README.md871 B
- 其他examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.policy.hcl443 B
- 其他examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.sentinel1.4 KB
- 参考文档examples/conversion/cloudtrail-server-side-encryption-enabled/README.md846 B
- 其他examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.policy.hcl447 B
- 其他examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.sentinel1.5 KB
- 参考文档examples/conversion/dms-endpoint-should-be-ssl-configured/README.md872 B
- 其他examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.policy.hcl510 B
- 其他examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.sentinel1.4 KB
- 参考文档examples/conversion/dms-endpoints-should-use-ssl/README.md800 B
- 其他examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.policy.hcl966 B
- 其他examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.sentinel2.9 KB
- 参考文档examples/conversion/ec2-network-acl-should-have-subnet-ids/README.md970 B
- 其他examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.policy.hcl796 B
- 其他examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.sentinel3.6 KB
- 参考文档examples/conversion/ec2-vpc-default-security-group-no-traffic/README.md1.1 KB
- 其他examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.policy.hcl379 B
- 其他examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.sentinel1.3 KB
- 参考文档examples/conversion/efs-access-point-should-enforce-user-identity/README.md727 B
- 其他examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.policy.hcl478 B
- 其他examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.sentinel1.5 KB
- 参考文档examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/README.md777 B
- 其他examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.policy.hcl515 B
- 其他examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.sentinel1.5 KB
- 参考文档examples/conversion/elasticsearch-encrypted-at-rest/README.md734 B
- 其他examples/conversion/elasticsearch-https-required/elasticsearch-https-required.policy.hcl1.0 KB
- 其他examples/conversion/elasticsearch-https-required/elasticsearch-https-required.sentinel2.3 KB
- 参考文档examples/conversion/elasticsearch-https-required/README.md904 B
- 其他examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.policy.hcl520 B
- 其他examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.sentinel1.9 KB
- 参考文档examples/conversion/elasticsearch-in-vpc-only/README.md890 B
- 其他examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.policy.hcl776 B
- 其他examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.sentinel2.1 KB
- 参考文档examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/README.md1.1 KB
- 参考文档examples/conversion/s3-block-public-access-bucket-level/README.md1.1 KB
- 其他examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.policy.hcl1.1 KB
- 其他examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.sentinel3.2 KB
- 参考文档examples/conversion/s3-bucket-should-have-object-lock-enabled/README.md975 B
- 其他examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.policy.hcl961 B
- 其他examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.sentinel2.8 KB
- 参考文档examples/conversion/secretsmanager-auto-rotation-enabled-check/README.md955 B
- 其他examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.policy.hcl798 B
- 其他examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.sentinel2.2 KB
- 参考文档examples/conversion/step-functions-state-machine-logging-enabled/README.md778 B
- 其他examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.policy.hcl655 B
- 其他examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.sentinel1.6 KB
- 参考文档examples/README.md2.5 KB
- 参考文档README.md1.7 KB
- 参考文档references/tfpolicy-author.md94.6 KB
- 参考文档references/tfpolicy-test.md69.5 KB
- 参考文档references/verified-syntax.md97.3 KB
03 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
04 同仓库更多 Skills
claude-design
Produce thoughtful, high-fidelity design artifacts in HTML — landing pages, slide decks, interactive prototypes, animated videos, posters, wireframes, and visual explorations. Use whenever the user asks to design, mock up, prototype, visualize, storyboard, or explore UI options — including phrases like "make a deck", "design a landing page", "prototype this flow", "animate this concept", "build a pitch deck", "create a poster", "visualize this idea", or "design something for a brand". Enforces fact verification (WebSearch before assuming a product exists or its version), the Core Asset Protocol for branded work (logo, product shots, and UI screenshots are first-class, not just colors and fonts), a Design Direction Advisor fallback that offers 3 differentiated directions from 10 design philosophies when the brief is too vague, commits to a visual system up front, presents multiple variations, and avoids AI-design tropes (aggressive gradients, emoji bullets, generic templates).
color-expert
Use when working with color naming, color theory, color spaces, color definitions, or any task involving color knowledge - palettes, ramps, gradients, conversions, accessibility, perceptual matching, pigment mixing, print-vs-screen color, CSS color syntax, or historical color terminology. Use this skill whenever the user is choosing, comparing, generating, naming, converting, or explaining colors, even if they do not explicitly ask for "color theory."
ai-graphic-design
Guide for creating logos, brand identities, and visual assets using AI tools — covers tool selection, prompt engineering, vectorization pipelines, mockups, automation, and IP safety.
vintage
1950s-1990s nostalgia with skeuomorphic touches, grainy textures, retro color palettes, and pixel-style typography.
skeumorphism
Real-world mimicry with textured surfaces, 3D effects, and familiar physical metaphors for intuitive digital interfaces.
retro
Throwback design with vintage-inspired typography, high-contrast retro palettes, and nostalgic visual elements.