Skip to main content
Type: rvn-stack · Latest version: 1.2.4

Readme

Automate Terraform and OpenTofu workflows with git-driven deployments and managed state.

Overview

A Stack represents a single Terraform or OpenTofu project connected to a git repository. Ravion monitors your repository for changes and automatically executes infrastructure workflows when code is pushed or pull requests are opened. Stacks provide:
  • Automated plan/apply on git push to your primary branch or via pull requests
  • Manual execution for ad-hoc plans, applies, and destroys on the primary branch
  • Managed state backend (optional) for configurations that declare an empty cloud {} block

Use cases

Workflow types

Git-triggered workflows

Ravion automatically responds to repository events: Watch paths control which file changes trigger workflows. By default, any file change (**/*) triggers a run. Configure specific paths or patterns to limit triggers to relevant files.

Manual workflows

Execute workflows on-demand from the Ravion dashboard or API:

Pipeline integration

Stacks execute using your organization’s default pipelines. Pipelines are configured separately and define:
  • Execution steps (init, plan, apply)
  • Approval requirements (default pipelines require manual approval before apply)
  • Environment and runner settings
  • Pre/post hooks
When you create a Stack, it automatically inherits the default change pipeline (for plan/apply) and destroy pipeline. This ensures consistent workflow behavior across all stacks in your organization.

Configuration

State management

Terraform and OpenTofu track infrastructure in a state file. Ravion offers two options:
  • Managed state (default): Ravion stores and manages your state file. Add an empty cloud {} block to your Terraform configuration; Ravion supplies the workspace configuration at runtime.
  • Self-managed state: Disable the Ravion backend and configure your own (S3, GCS, Azure Storage, etc.) in your Terraform configuration.
For Ravion-managed state, include:

Terraform vs OpenTofu

OpenTofu is recommended. In 2023, HashiCorp changed Terraform’s license from open-source to BSL. The open-source Terraform versions are limited to < 1.6.0. OpenTofu is the community fork that continues active development under a true open-source license (MPL 2.0).

Learn more

Curated list of Terraform resources and learning material OpenTofu Terraform (limited to < 1.6.0)

Inputs reference

All inputs for rvn-stack version 1.2.4. Use the name shown for each field as the input key in module config.

Where to run Terraform plan & apply

aws_account_id
string
required
AWS Account. Where to execute the Terraform plan & apply steps
  • Shown when: {"default_networking":true}
default_networking
boolean
Use default VPC, subnet and security group.
  • Default: true
aws_region
string
required
Region. Where to execute the Terraform plan & apply steps
  • Shown when: {"default_networking":true}
execution_environment_id
string
Execution environment. Specify the VPC, subnet, and security group for Pipeline Terraform runners. Defaults to the Environment’s default Execution Environment
  • Shown when: {"default_networking":false}

Source code

repo
gitrepo
required
Git repository.
primary_branch
string
required
Primary branch.
  • Default: main
base_path
string
Base path. Folder containing your Terraform files (relative to repo root)
watch_paths
string_array
Watch paths. File paths glob patterns (e.g., src/**) that trigger a pipeline run when changed. Defaults to **
  • Default: ["<<module.input.base_path>>/**"]

Stack inputs

terraform_variable_files
string_array
Terraform variable files. Relative paths from base path to .tfvars or .tfvars.json files (equivalent to -var-file flags)
tf_variables
object
Terraform variables. Variables passed to Terraform/OpenTofu (equivalent to -var flags)
env_variables
object
Environment variables.

IaC tool

tool
string
required
Tool. Terraform is no longer free open source. OpenTofu is the popular community fork with full Terraform compatibility.
  • Default: opentofu
  • Allowed values: opentofu (OpenTofu (Recommended)), terraform (Terraform (FOSS, limited < v1.6.0))
terraform_version
string
required
Terraform version.
  • Default: $values:first
  • Shown when: {"tool":"terraform"}
opentofu_version
string
required
OpenTofu version.
  • Default: $values:first
  • Shown when: {"tool":"opentofu"}
use_ravion_state_backend
boolean
Use Ravion for your Terraform state. Use Ravion-managed state. Your Terraform configuration must include an empty terraform { cloud {} } block; Ravion supplies the workspace configuration. Disable to use your own backend, including S3 or Terraform Cloud.
  • Default: true
  • Immutable after creation
ravion_state_backend_workspace
string
Ravion Terraform workspace name. Override Terraform state backend workspace name. Defaults to project + environment + module given ids.
  • Immutable after creation
  • Shown when: {"use_ravion_state_backend":true}