terraform-knowledge-patch

Provide versioned Terraform and OpenTofu guidance on deprecated APIs and secret handling.

22|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/Nevaberry/nevaberry-plugins --skill terraform-knowledge-patch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-knowledge-patch
Source: https://github.com/Nevaberry/nevaberry-plugins/tree/main/plugins/terraform-knowledge-patch/skills/terraform-knowledge-patch
Command: npx skills add https://github.com/Nevaberry/nevaberry-plugins --skill terraform-knowledge-patch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This knowledge patch prevents outdated or incorrect Terraform and OpenTofu usage by providing concise, versioned guidance about new language features, lifecycle semantics, and provider behaviors that models often miss after training cutoffs.

Core Features & Use Cases

  • Ephemeral secrets and write-only arguments: Explains ephemeral variables, ephemeral resources, ephemeralasnull, and _wo attributes for secrets that must not be persisted to state.
  • Validation, imports, and identity: Details cross-object variable validation, structured identity imports, and bulk import/query workflows to avoid fragile import patterns.
  • Stacks, Actions, and OpenTofu divergences: Covers component-based Stacks (HCP), provider-defined Actions (day-2 operations), and OpenTofu-specific features like enabled lifecycle, const variables, and state encryption differences.
  • Use Case: Use this patch to check module refactors, secret handling changes, import migrations, or when switching between Terraform and OpenTofu to avoid breaking changes and unsafe state manipulations.

Quick Start

Load the terraform-knowledge-patch and ask the assistant to analyze your Terraform/OpenTofu configuration for deprecated APIs, ephemeral secret handling, and provider-specific import guidance.

Frequently Asked Questions about terraform-knowledge-patch

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

FAQPage Schema
How do I prevent secrets from being persisted in Terraform state?

To prevent secrets in Terraform state, use ephemeral variables, ephemeral resources, and write-only arguments like _wo attributes. The ephemeralasnull function ensures sensitive values remain unpersisted during state operations across Terraform 1.8 and later.

What is the correct way to import resources using structured identity in Terraform?

Structured identity imports in Terraform replace fragile import patterns by using cross-object variable validation and bulk import workflows. This method provides reliable resource identity imports for configurations targeting Terraform 1.8 through 1.15.

How do OpenTofu and Terraform differ in state encryption and lifecycle features?

OpenTofu and Terraform diverge in state encryption, enabled lifecycle blocks, and const variables. OpenTofu 1.7 through 1.12 includes native state encryption and enabled lifecycle arguments absent in Terraform 1.8 through 1.15.

What are Terraform Stacks and provider-defined Actions for day-2 operations?

Terraform Stacks use component-based configurations via HCP for orchestrating multiple deployments, while provider-defined Actions execute day-2 operations. Both features require specific syntax to avoid breaking changes during module refactors.

Does this knowledge patch cover both Terraform and OpenTofu provider configurations?

Yes, this knowledge patch covers Terraform 1.8 through 1.15 and OpenTofu 1.7 through 1.12. It applies to developers authoring modules, provider configurations, imports, ephemeral secrets, Stacks, and provider actions across both tools.

Why does my Terraform module refactor break after switching to OpenTofu?

OpenTofu divergences from Terraform include differences in state encryption, const variables, and enabled lifecycle blocks. Use versioned guidance to identify deprecated APIs and unsafe state manipulations when switching between platforms to prevent breakage.