policy-compliance

Diagnose Sentinel and OPA policy check failures in HCP Terraform.

4|3|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/thrashr888/hcptf-cli --skill policy-compliance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policy-compliance
Source: https://github.com/thrashr888/hcptf-cli/tree/main/.skills/policy-compliance
Command: npx skills add https://github.com/thrashr888/hcptf-cli --skill policy-compliance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you investigate and resolve policy check failures in HCP Terraform, ensuring your infrastructure adheres to governance, security, and compliance standards.

Core Features & Use Cases

  • Diagnose Failures: Understand why Sentinel or OPA policies failed during a Terraform run.
  • Identify Violations: Pinpoint the specific resources that violated policy rules.
  • Remediate Issues: Guide users through fixing code, overriding policies, or adjusting policy configurations.
  • Use Case: A Terraform run is blocked by a failed security policy. Use this Skill to view the policy details, identify the non-compliant security group, and either update the Terraform code to restrict access or override the policy if it's a known exception.

Quick Start

Use the policy-compliance skill to view the details of a failed policy check for run ID 'run-abc123'.

Frequently Asked Questions about policy-compliance

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

FAQPage Schema
How do I fix HCP Terraform policy check failures blocking my infrastructure deployment?

To fix HCP Terraform policy check failures, you investigate the specific Sentinel or OPA violations, identify non-compliant resources, and apply remediation strategies like code fixes, policy overrides, or policy adjustments.

Why did my Sentinel policy fail in HCP Terraform and which resource caused the violation?

Sentinel policy failures occur when infrastructure code violates governance rules, and you can pinpoint the specific non-compliant resources by investigating the policy check details for the affected Terraform run.

How do I troubleshoot OPA policy violations in HCP Terraform runs?

Troubleshooting OPA policy violations involves viewing the policy check details for your run ID, understanding the failed rules, identifying non-compliant resources, and updating the Terraform code or adjusting the policy configuration.

What permissions do I need to resolve policy compliance issues in HCP Terraform?

Resolving policy compliance issues requires authenticated access to the HCP Terraform CLI along with relevant workspace and policy set permissions to view run details and apply remediation strategies.

Can I override a failed security policy in HCP Terraform if it is a known exception?

Yes, you can override a failed security policy in HCP Terraform if it is a known exception, or you can update the Terraform code to restrict access and bring the resource into compliance.

What is the best way to manage HCP Terraform governance and security policy remediation?

The best way to manage HCP Terraform governance and security policy remediation is to diagnose policy failures, pinpoint non-compliant resources, and execute targeted code fixes or policy adjustments.