All skills
hashicorp avatar

/terraform-policy

@516354c official
by hashicorphashicorp/agent-skills880 stars
130

Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.

Use this Skill: https://skilld.dev/gh/hashicorp/agent-skills/terraform-policy

This session only. Nothing lands on disk.

examplesconversions3-block-public-access-bucket-levelREADME.md

≈281 tokens on demand. Your agent reads this file only when SKILL.md points to it.

S3 Block Public Access Bucket Level

Source Sentinel Policy

s3-block-public-access-bucket-level.sentinel

Conversion Quality

Not convertible as an exact translation

What the approximation does

The tfpolicy approximation checks whether an aws_s3_bucket has a matching aws_s3_bucket_public_access_block resource and whether all four public access settings are enabled.

Why exact conversion is not possible today

The Sentinel policy combines:

  • tfconfig/v2
  • tfconfig-functions
  • plan-time variable resolution
  • config reference metadata
  • module-aware address reconstruction

Current tfpolicy guidance does not expose that full config-analysis surface. In particular, tfpolicy cannot safely reproduce the Sentinel behavior that inspects variable references and configuration graph relationships before values are fully materialized.

Limitations encountered

  • The approximation relies on resolved values via core::getresources()
  • It cannot reproduce variable-reference evaluation from the Sentinel policy
  • It may differ from Sentinel on first creation or heavily parameterized module usage

Source: SKILL.md on GitHub

No alerts3d3 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill is safe and provides a comprehensive framework for authoring, testing, and converting Terraform Policies. It includes detailed security best practices, such as safe attribute handling and proper IAM policy enforcement, to help users create robust policies.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: LOW · No issues

Signed by skilld at 516354c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated last week
Other metadata
metadata
{
  "lifecycle-status": "active",
  "copyright": "Copyright IBM Corp. 2026",
  "version": "0.1.0"
}

README badge

README badge for hashicorp/agent-skills/terraform-policy