Stacks
A stack is the fundamental unit of infrastructure management in Zenfra. It connects a Git repository to a managed infrastructure lifecycle — combining source code, infrastructure state, and configuration into a single manageable entity.
Overview
Each stack represents a specific infrastructure project and tracks:
- Source code — a Git repository, branch, and project root path containing your Terraform or OpenTofu code
- Infrastructure state — the current state of your managed resources (managed by Zenfra)
- Configuration — environment variables, mounted files, and cloud integrations attached to the stack
Stacks are scoped to a space and execute runs on a designated worker pool.
Stack list
The Stacks page displays all stacks in your organization with the following columns:
| Column | Description |
|---|---|
| Status | The state of the most recent run (Finished, Failed, No runs) |
| Name | The stack's display name |
| Space | The space the stack belongs to |
| Execution Target | The worker pool assigned (e.g., default-pool, Public) |
| IAC | The IaC engine used (Terraform or OpenTofu) |
| Created | When the stack was created |
Creating a stack
Click Create Stack on the Stacks page to launch the 4-step creation wizard:
Step 1: Basic Info
- Stack Name — a unique name for your stack
- Space — the space to place the stack in
- Worker Pool — the pool that will execute runs for this stack
Step 2: Git Config
- VCS Integration — select a connected source control provider
- Repository — choose the repository containing your IaC code
- Branch — the branch to track (e.g.,
main) - Project Root — the subdirectory within the repository (if your code is not at the root)
Step 3: Bundles
Optionally attach configuration bundles to inject environment variables and mounted files into runs.
Step 4: Review
Review all settings and confirm to create the stack.
Stack detail
Clicking a stack name opens the stack detail page, which includes:
- Header — stack name, current status badge, Lock and Trigger buttons, and metadata (repo link, branch, project root, IaC engine and version, worker pool)
- Runs tab — a paginated table of all runs for this stack
- Configuration tab — read-only view of the stack's execution, source, IaC, bundles, and cloud integration settings
- Settings tab — stack information including IDs, space, worker pool, creation date, and last run
Triggering runs
The Trigger button on a stack offers three run types:
| Run Type | Description |
|---|---|
| Plan & Apply | A tracked run that generates a plan, then waits for approval before applying. This is the standard deployment workflow. |
| Plan Only | Generates a plan to preview changes without applying them. Useful for reviewing what would change. |
| Destroy | Removes all resources managed by this stack. Use with caution. |
Locking
The Lock button prevents new runs from being triggered on a stack. This is useful when you need to make manual changes or prevent accidental deployments during maintenance.
Configuration tab
The Configuration tab shows a read-only view of the stack's settings, organized into sections:
- Execution — execution target (Public or Private Pool) and worker pool name
- Source — VCS integration, repository, branch, and project root path
- Infrastructure as Code — engine (Terraform or OpenTofu) and version
- Attached Bundles — configuration bundles linked to this stack
- Cloud Integrations — connected cloud provider integrations with their role ARN and read/write permissions
Settings tab
The Settings tab displays:
- Stack ID — the unique identifier for this stack
- Space — the space ID (with link to the space)
- Worker Pool — the pool ID (with link to the pool)
- Created — when the stack was created
- Last Run — when the most recent run completed