terraform-stacks

Installation
Summary

Comprehensive guide for creating, validating, and managing Terraform Stack configurations across environments.

  • Covers Stack language fundamentals: component definitions (.tfcomponent.hcl), deployment instances (.tfdeploy.hcl), file organization, and required Terraform v1.13+
  • Supports multi-region and multi-environment deployments using for_each on providers and components, with automatic dependency inference between components
  • Includes workload identity (OIDC) authentication, identity token blocks, variable sets via store blocks, and deployment groups with auto-approval rules
  • Provides CLI commands for initialization, validation, configuration upload, and deployment monitoring; includes HCP Terraform API guidance for programmatic monitoring in automation
  • Documents common patterns (component dependencies, deferred changes, linked Stacks), best practices for module compatibility and state isolation, and troubleshooting for circular dependencies and destruction workflows
SKILL.md

Terraform Stacks

Terraform Stacks simplify infrastructure provisioning and management at scale by providing a configuration layer above traditional Terraform modules. Stacks enable declarative orchestration of multiple components across environments, regions, and cloud accounts.

Core Concepts

Stack: A complete unit of infrastructure composed of components and deployments that can be managed together.

Component: An abstraction around a Terraform module that defines infrastructure pieces. Each component specifies a source module, inputs, and providers.

Deployment: An instance of all components in a stack with specific input values. Use deployments for different environments (dev/staging/prod), regions, or cloud accounts.

Stack Language: A separate HCL-based language (not regular Terraform HCL) with distinct blocks and file extensions.

File Structure

Terraform Stacks use specific file extensions:

  • Component configuration: .tfcomponent.hcl
Related skills
Installs
2.1K
GitHub Stars
613
First Seen
Jan 26, 2026