drift

Analyze HCP Terraform workspace health assessments to resolve infrastructure drift.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps users investigate and resolve discrepancies between their actual infrastructure state and their desired Terraform configuration, preventing unexpected behavior and ensuring system stability.

Core Features & Use Cases

  • Drift Detection: Identifies resources that have changed outside of Terraform.
  • Root Cause Analysis: Provides details on resource changes, including attribute differences and VCS commit information.
  • Resolution Guidance: Offers strategies like applying fixes, updating code, or importing resources.
  • Use Case: When an alert indicates an EC2 instance was deleted manually, this skill guides you through understanding the drift and deciding whether to recreate the instance via terraform apply or update the code if the deletion was intentional.

Quick Start

Use the drift skill to investigate drift in the 'my-org' organization and 'my-workspace' workspace.

Frequently Asked Questions about drift

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

FAQPage Schema
How do I resolve infrastructure drift in HCP Terraform workspaces?

Infrastructure drift resolution investigates discrepancies between actual state and desired Terraform configuration by analyzing health assessments, providing actionable strategies to apply fixes, update code, or import resources for system stability.

What is infrastructure drift in Terraform and when do I need to investigate it?

Infrastructure drift occurs when actual resources change outside of Terraform, causing unexpected behavior. You investigate drift when health assessments indicate manual deletions, modifications, or unexpected resource creations to ensure system stability.

Do I need HCP Terraform Plus or Enterprise to detect infrastructure drift?

Yes, detecting infrastructure drift requires HCP Terraform Plus or Enterprise with health assessments enabled and authenticated CLI access to investigate discrepancies and provide actionable resolution guidance for your workspaces.

How do I fix an EC2 instance deleted manually outside of Terraform?

To fix a manually deleted EC2 instance outside of Terraform, analyze the drift alert to understand the change, then decide whether to recreate the instance via terraform apply or update your code if the deletion was intentional.

Can I use jq with Terraform drift resolution scripts?

Yes, jq is a required dependency for running drift resolution scripts, processing JSON data from HCP Terraform health assessments to analyze resource attribute differences and VCS commit information during drift investigation.

What are the limitations of automated Terraform drift resolution?

Automated Terraform drift resolution is limited by requiring HCP Terraform Plus or Enterprise with health assessments enabled. It provides guidance for resource changes, but users must manually decide whether to apply fixes or update code based on root cause analysis.