AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

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.

Original source
hashicorp
License
MPL-2.0
Pinned revision
bc6b14b77481c3cbfbb06a0166be7245ed45798c

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read hashicorp--terraform-policy at revision bc6b14b77481c3cbfbb06a0166be7245ed45798c, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 22

examples/conversion/elasticsearch-https-required/README.md

Elasticsearch HTTPS Required

Source Sentinel Policy

elasticsearch-https-required.sentinel

Conversion Quality

Good

Why it is not labeled Perfect

The enforcement intent is preserved, but the structure changes more noticeably than in a simple attribute check. The Sentinel version uses helper functions plus nested map lookups. The tfpolicy version rewrites that logic into direct block access with core::try() and separate enforce blocks.

Key translation notes

  • Nested maps.get() calls become core::try(local.endpoint_options[0]....)
  • One compound Sentinel predicate becomes multiple focused enforce blocks
  • The end-state requirement is preserved clearly in tfpolicy

Limitations encountered

This conversion depends on provider schema shape for domain_endpoint_options. As with other tfpolicy policies, block/list/set handling must match the exposed schema exactly.