Truth in IT
    • Sign In
    • Register
        • Videos
        • Channels
        • Pages
        • Galleries
        • News
        • Events
        • All
Truth in IT Truth in IT
  • Data Management ▼
    • Converged Infrastructure
    • DevOps
    • Networking
    • Storage
    • Virtualization
  • Cybersecurity ▼
    • Application Security
    • Backup & Recovery
    • Data Security
    • Identity & Access Management (IAM)
    • Zero Trust
    • Compliance & GRC
    • Endpoint Security
  • Cloud ▼
    • Hybrid Cloud
    • Private Cloud
    • Public Cloud
  • Webinar Library
  • TiPs
  • DRAW

HashiCorp: Deploying Kubernetes Clusters with Terraform Stacks

HashiCorp
08/01/2026
0 (0%)
Share
  • Comments
  • Download
  • Transcript
Report Like Favorite
  • Share/Embed
  • Email
Link
Embed

Transcript


and today I'm going to demonstrate how to use the Stacks feature in HTTP Terraform. Stacks provide a powerful configuration layer in Terraform that simplifies managing your infrastructure modules and then repeating that infrastructure. For this demo, I'll be deploying a Kubernetes cluster hosting a simple HashiBank web application to illustrate how you can use Stacks to streamline the deployment and management of Kubernetes clusters with Terraform. Let's start out by taking a look at the configuration for my stack. Stacks replace Terraform's traditional root module structure with a new configuration layer on top of your Terraform child and shared modules. Stack configuration files use a new file type, tfstack.htl, to define what you would like to deploy. In this configuration, I have a component block for each top-level module I need to include in this stack, including a VPC, EKS cluster, Kubernetes namespace, and my HashiBank web app. In this example, each of my components sources a local module. However, component sources support referencing modules from all of the same places as a standard module block. Each component also takes in a set of inputs, which can be outputs to the previous component. In a stack, you also declare all of your providers in your stack configuration and then pass necessary providers into each of your components. I've now switched to the file where I've declared all of my providers for this stack. Here you can see that I can also use outputs of my components as inputs to my providers. At runtime, Terraform is going to construct a graph of dependencies based off these inputs and outputs, and we'll use it to determine not only the plan and apply order for the components in my stack, but also for the providers in my stack. The deployment configuration file, tfdeploy.htl, defines how many times HTTP Terraform should deploy a stack's infrastructure. I'd like to deploy a development, production, and disaster recovery instance of my HashiBank app, so I've declared a deployment block for each way I'd like to repeat my infrastructure. Here I can customize the inputs for each deployment as needed. For example, I'm using one region for disaster recovery, US-East-1. And if we scroll up here, a different one for development, US-West-2. I've also defined an orchestration rule here using an orchestrate block, which allows me to define check blocks that auto-approve any deployments that meet the criteria defined in these checks. In this case, I will allow any plans in development to be auto-approved if there are no resources being removed. Switching over to the HTTP Terraform console, I'm going to create a stack for this configuration, which I've already configured to point to the repository we were just looking at. Immediately we see that a new configuration is being prepared for us where HTTP Terraform is looking at the latest commit in this connected repository and is figuring out what deployments and components are in my stack. The stack has picked up my three deployments and has started to queue plans for each one. We can see that if we scroll down here. Looking at the quick view for production, we'll be able to see some details on the plan expanded out. I'm going to click into my VPC component here, and we can see details about the 23 planned additions, which look like what I'm used to seeing in a standard Terraform plan today. Terraform has also let us know that this plan is ready to be approved with deferred changes. And what that means is that some resources did not have enough information for Terraform to produce a full plan, like this Kubernetes namespace, which has an unknown provider configuration. Instead of failing, which is what standard Terraform does today, my stack is allowing me to approve a partial plan here and is letting me know that it will produce follow-up plans for resources like my namespace once that information is available after apply. Now, closing out of the production plan, I want to focus your attention here on the development deployment, which does not have a plan pending approval, and is instead currently applying changes. Because of that orchestration rule I showed you earlier, development didn't require manual approval. My development deployment has completed applying. Clicking in, we can see a history of what was applied, and we can see that multiple plans and applies took place in order to get all of my infrastructure set up, thanks to the deferred changes. I can expand the state here to grab the URL of my HashiBank application, and let's just make sure that that's all set up. And it looks like my application is up and running. We can see that it's been deployed successfully. Now, I'm ready to move on to approving this change for production and even disaster recovery. This demo covered a lot of ground, so I'll summarize a few key takeaways here. Deployments in a stack allow easily repeating infrastructure, useful across environments like dev, staging, and production, or when deploying across multiple regions or cloud provider accounts. Deferred changes in a stack streamline deploying workloads with complex dependencies like Kubernetes, making it possible to do this with a single Terraform configuration. Orchestration rules in a stack allow automating approvals, reducing the need for manual and error-prone reviews. For more information about stacks, check out the HTTP Terraform docs and tutorials at developer.hashicorp.com and head over to cloud.hashicorp.com to get started. Thanks for watching. Microsoft Mechanics www.microsoft.com www.microsoft.com www.microsoft.com www.microsoft.com

TL;DR

  • Terraform Stacks introduce a new configuration layer using tfstack.hcl files that simplify managing and repeating infrastructure across multiple environments, regions, or accounts through deployment blocks.
  • Deferred changes enable approving partial plans when resources lack complete information, automatically generating follow-up plans once dependencies are available—critical for complex Kubernetes deployments.
  • Orchestration rules automate plan approvals based on defined criteria, reducing manual review overhead while maintaining safety guardrails like preventing auto-approval of resource deletions.
  • The demo deploys a Kubernetes cluster with a web application across dev, production, and disaster recovery environments, showing how component dependencies create execution graphs for both resources and providers.

Terraform Stacks Configuration Layer

This demonstration introduces Terraform Stacks, a new configuration layer that sits above traditional Terraform modules to simplify infrastructure management at scale. The demo walks through deploying a Kubernetes cluster hosting a HashiBank web application across multiple environments. Stacks replace Terraform's root module structure with tfstack.hcl files that define component blocks for each top-level module, including VPC, EKS cluster, Kubernetes namespace, and application components. Each component sources modules and accepts inputs that can reference outputs from other components, creating a dependency graph that Terraform uses to determine execution order for both components and providers.

Deployment Patterns and Orchestration

The deployment configuration uses tfdeploy.hcl files to define how many times infrastructure should be repeated, demonstrated through development, production, and disaster recovery deployments with region-specific customizations. A key feature showcased is orchestration rules that enable auto-approval of plans meeting specific criteria, such as automatically approving development deployments with no resource deletions. The demo also highlights deferred changes, which allow Terraform to approve partial plans when some resources lack complete information at plan time, then automatically generate follow-up plans once dependencies are resolved. This capability is particularly valuable for complex workloads like Kubernetes where provider configurations depend on infrastructure that doesn't exist yet.

Chapters

0:00 - Introduction to Terraform Stacks
0:32 - Stack Configuration Structure
2:05 - Deployment Configuration and Orchestration
3:07 - Creating and Planning Deployments
4:40 - Applying Changes and Verification
5:40 - Key Takeaways and Resources

Key Quotes

0:09 "Stacks provide a powerful configuration layer in Terraform that simplifies managing your infrastructure modules and then repeating that infrastructure."
0:36 "Stacks replace Terraform's traditional root module structure with a new configuration layer on top of your Terraform child and shared modules."
4:25 "Instead of failing, which is what standard Terraform does today, my stack is allowing me to approve a partial plan here and is letting me know that it will produce follow-up plans for resources like my namespace once that information is available after apply."
5:45 "Deployments in a stack allow easily repeating infrastructure, useful across environments like dev, staging, and production, or when deploying across multiple regions or cloud provider accounts."

FAQ

How do Terraform Stacks differ from traditional Terraform root modules?

Stacks introduce a new configuration layer using tfstack.hcl files that sit above your existing Terraform modules. Instead of defining resources directly in a root module, you declare components that reference child modules, define their dependencies through inputs and outputs, and specify deployment patterns. This abstraction makes it easier to repeat infrastructure across environments and manage complex dependencies.

What are deferred changes and why are they important for Kubernetes deployments?

Deferred changes allow Terraform to approve and apply a partial plan when some resources don't have enough information to be fully planned, such as a Kubernetes provider that needs a cluster endpoint that doesn't exist yet. Instead of failing, Terraform applies what it can and automatically generates follow-up plans once the missing information becomes available, enabling single-configuration deployments of complex interdependent infrastructure.


Categories:
  • » Cybersecurity » Application Security
  • » Data Management » DevOps
  • » Cybersecurity » Cloud Security
  • » Data Protection
Channels:
News:
Events:
Tags:
  • DevSecOps
  • Cloud Security
  • Technical Deep Dive
  • Demo
  • Getting Started
  • Terraform Stacks
  • Kubernetes deployment
  • Infrastructure as Code
  • Multi-environment deployment
  • Deferred changes
  • Orchestration rules
  • EKS cluster management
  • HCP Terraform
  • Component dependencies
Show more Show less

Browse videos

  • Related
  • Featured
  • By date
  • Most viewed
  • Top rated
  •  

              Video's comments: HashiCorp: Deploying Kubernetes Clusters with Terraform Stacks

              Industry Events (Sponsor Hosted)

              • Aug
                03

                Discover DLP Memories: The ever-evolving triage agent enhancing efficiency each shift.

                08/03/202611:00 AM ET
                • Aug
                  06

                  Safeguarding Sensitive Data in the Era of Public AI Platforms

                  08/06/202604:00 AM ET
                  • Aug
                    06

                    AI Agents Revolutionizing Identity Attacks: Same Tactics, Enhanced Speed

                    08/06/202602:00 PM ET
                    More events

                    Upcoming Webinar Calendar

                    • 08/03/2026
                      11:00 AM
                      08/03/2026
                      Discover DLP Memories: The ever-evolving triage agent enhancing efficiency each shift.
                      https://www.truthinit.com/index.php/channel/2062/discover-dlp-memories-the-ever-evolving-triage-agent-enhancing-efficiency-each-shift/
                    • 08/06/2026
                      04:00 AM
                      08/06/2026
                      Safeguarding Sensitive Data in the Era of Public AI Platforms
                      https://www.truthinit.com/index.php/channel/2058/safeguarding-sensitive-data-in-the-era-of-public-ai-platforms/
                    • 08/06/2026
                      02:00 PM
                      08/06/2026
                      AI Agents Revolutionizing Identity Attacks: Same Tactics, Enhanced Speed
                      https://www.truthinit.com/index.php/channel/2064/ai-agents-revolutionizing-identity-attacks-same-tactics-enhanced-speed/
                    • 08/13/2026
                      12:00 PM
                      08/13/2026
                      Harnessing AI for Secure Innovation in the Enterprise with Netskope & Omada
                      https://www.truthinit.com/index.php/channel/2065/harnessing-ai-for-secure-innovation-in-the-enterprise-with-netskope-omada/
                    • 08/19/2026
                      12:00 PM
                      08/19/2026
                      Becoming Agent Ready: Insights and Strategies with Cyera
                      https://www.truthinit.com/index.php/channel/2036/becoming-agent-ready-insights-and-strategies-with-cyera/
                    • 09/02/2026
                      12:00 PM
                      09/02/2026
                      Unified Data Security in Action: Uncover, Analyze, and Resolve Threats
                      https://www.truthinit.com/index.php/channel/2045/unified-data-security-in-action-uncover-analyze-and-resolve-threats/
                    • 09/30/2026
                      04:00 AM
                      09/30/2026
                      AI Command Center: Optimizing Visibility and Control in Your Operations
                      https://www.truthinit.com/index.php/channel/2024/ai-command-center-optimizing-visibility-and-control-in-your-operations/
                    Truth in IT
                    • Sponsor
                    • About Us
                    • Terms of Service
                    • Privacy Policy
                    • Contact Us
                    • Preference Management
                    Desktop version
                    Standard version