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
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.
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- OpenTofu Documentation — Official docs
- Getting Started — Installation and first steps
- Migration from Terraform — Switching guide
- HashiCorp Developer Docs — Official documentation
- Terraform Tutorials — Hands-on learning
Inputs reference
All inputs forrvn-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. Where to execute the Terraform plan & apply steps
- Shown when:
{"default_networking":true}
Use default VPC, subnet and security group.
- Default:
true
Region. Where to execute the Terraform plan & apply steps
- Shown when:
{"default_networking":true}
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
Git repository.
Primary branch.
- Default:
main
Base path. Folder containing your Terraform files (relative to repo root)
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. Relative paths from base path to
.tfvars or .tfvars.json files (equivalent to -var-file flags)Terraform variables. Variables passed to Terraform/OpenTofu (equivalent to -var flags)
Environment variables.
IaC tool
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.
- Default:
$values:first - Shown when:
{"tool":"terraform"}
OpenTofu version.
- Default:
$values:first - Shown when:
{"tool":"opentofu"}
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 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}