terraform-stacks

Guide authoring and troubleshooting Terraform Stacks configurations with .tfcomponent.hcl and .tfdeploy.hcl files.

47|5|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/Cloudgeni-ai/opengeni --skill terraform-stacks-cloudgeni-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-stacks
Source: https://github.com/Cloudgeni-ai/opengeni/tree/main/packages/runtime/src/bundled_hashicorp_terraform_skills/terraform-stacks
Command: npx skills add https://github.com/Cloudgeni-ai/opengeni --skill terraform-stacks-cloudgeni-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Terraform Stacks users often struggle with correct Stack file structure, Stacks-specific HCL syntax, required blocks, authentication patterns, and understanding what to do when validations or deployments fail.

Core Features & Use Cases

  • Stack-specific configuration guidance: Understand the required file extensions and how Terraform Stacks processes component and deployment files.
  • Correct block authoring patterns: Learn how to write .tfcomponent.hcl and .tfdeploy.hcl using the right blocks such as variable, provider, component, output, identity_token, deployment, deployment_group, and deployment_auto_approve.
  • Multi-region and linked Stacks workflows: Apply patterns for for_each-based multi-region designs and cross-Stack dependencies using publish_output and upstream_input.
  • Automation-friendly monitoring: Use the HCP Terraform API monitoring approach (including artifacts and diagnostics) when CLI watch commands are unsuitable for non-interactive environments.

Quick Start

Ask the Skill to validate whether your Stack configuration files and blocks follow Terraform Stacks conventions and to suggest specific fixes based on your described folder structure and the errors you see.

Frequently Asked Questions about terraform-stacks

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

FAQPage Schema
How do I structure .tfcomponent.hcl and .tfdeploy.hcl files for Terraform Stacks?

To structure Terraform Stacks configurations, you author .tfcomponent.hcl files for component definitions and .tfdeploy.hcl files for deployment logic. These files utilize specific blocks like component, provider, variable, and deployment to model infrastructure.

How do I configure multi-region deployments using Terraform Stacks?

Configuring multi-region deployments in Terraform Stacks involves applying for_each patterns within your component and deployment blocks. This allows you to iterate over regions and dynamically provision infrastructure across multiple geographical locations.

How do I troubleshoot Terraform Stacks deployment failures and validation errors?

Troubleshooting Terraform Stacks deployment failures involves diagnosing common failure modes by mapping Stacks-specific HCL syntax and block structures to your real deployment workflows. You can analyze validation errors and apply suggested fixes based on your folder structure.

Can I use OIDC workload identity with Terraform Stacks for authentication?

Yes, you can use OIDC workload identity with Terraform Stacks. You configure this by authoring identity_token blocks within your configuration to establish secure, non-interactive authentication patterns for your multi-component infrastructure deployments.

How do I monitor Terraform Stacks deployments in non-interactive environments?

To monitor Terraform Stacks in non-interactive environments, you use the HCP Terraform API monitoring approach. This method retrieves deployment artifacts and diagnostics programmatically, replacing CLI watch commands when automation is required.

How do I link Terraform Stacks together for cross-stack dependencies?

To link Terraform Stacks together, you use publish_output and upstream_input blocks. This configuration allows you to pass values and establish dependencies between multiple stacks, enabling complex multi-environment infrastructure topologies.