Skip to main content
Define a project declaratively in .yaml, .yml, .json, .jsonc, or .cue. The top-level environments[] array contains moduleInstances[], and modules reference each other with moduleGivenIdRef.
A minimal ravion.yaml with a VPC, an ECS cluster, and a web service. Modules reference each other with moduleGivenIdRef.
ravion.yaml

Automatic updates with GitHub

Commit a ravion.yaml file to a repository connected through the Ravion GitHub App. The app automatically plans config changes on pull requests and applies them on pushes to the default branch. It matches the existing project using project.id, or project.givenId when no ID is supplied. You don’t need a GitHub Actions workflow. See GitHub integration for supported filenames, matching rules, and approval behavior. The integration requires an existing project; use the CLI steps below to create one if needed. Pulled config files include autoapprove: true at the top level, so stack runs the app starts apply right away when their plan has no destructive changes; runs that destroy or replace resources still wait for approval. Set autoapprove: false to make every run wait. To keep fixtures or examples out of automatic plans, applies, and conflict checks, add their paths to a root .ravionignore file.

Pull and apply with the CLI

Store the config file in your repository and manage it with the CLI.
1

Create or select the project

For a new project, create the project and write its draft config file:
If you already have a config file, you can skip this step. ravion project config apply <project-id> creates the project when it does not exist yet and the file’s project.givenId matches <project-id>, and --dry-run plans that creation without creating anything.
For an existing project, write its live config to a file:
Creating or pulling a .yaml, .jsonc, or .cue file adds an AI skill header, inline field comments, and quick links to the generated file. Plain .json does not support comments, so it omits these annotations.
2

Edit the file

Add or edit environments and add, edit, or remove module instances.
Removing a module instance from the config file will run the Terraform plan for the Terraform destroy action and then wait for manual approval. You’ll need to manually approve the destroy and then delete the module instance from the system.
3

Preview with a dry run

Validate the file and print the planned changes without applying them.
A dry run writes nothing, so the project, environment, and module instance IDs it would create do not exist yet and print as (known after apply). Given IDs are the identifiers you control, so use those to match plan output against your config file.
4

Apply the changes

Apply the config to update the stored config and run the Terraform plan if needed.
Pulled files set autoapprove: true at the top level, and both the CLI and the GitHub App read it: stack change pipeline runs whose Terraform plan has no destructive changes apply without stopping at an approval gate, and runs that destroy or replace resources wait for approval. To review every plan first, pass --autoapprove=false:
The flag overrides the file. Set autoapprove: false in the file, or remove the field, to make every plan wait by default; --autoapprove then skips the wait for one apply.Add --description to set the description on every stack run the apply creates, for example --description "https://github.com/acme/app/pull/12" to link the runs to the pull request that changed the config. Without it, runs keep Ravion’s generated description.
5

Review and approve the stack run

Applying a config change starts a stack change pipeline run when the affected module has a Terraform stack. The stack run creates a Terraform plan, then applies it right away when the file sets autoapprove: true and the plan has no destructive changes. It waits for manual approval when the plan destroys or replaces resources, when the file does not set autoapprove: true, or when the apply ran with --autoapprove=false.The apply prints a PIPELINE_RUN_ID for every stack run it starts, plus the wait command for those runs. Follow a run with wait --watch instead of polling pipeline run get.The runs are listed in dependency order, so you can work through them one at a time: a run only starts once the runs it depends on succeed.For a run that waits for approval, wait for that gate, review the plan, approve, then wait for the apply:
For an autoapproved run, wait for it to finish, then inspect the Terraform results:
6

Commit for automatic updates

Commit the config file and let the Ravion GitHub App plan future changes on pull requests and apply them on merge to the default branch.See GitHub integration.

Reference module outputs

Any module input can take its value from another module’s stack output with the << … >> template syntax. Write the template as the input’s value; there is no separate field or wrapper.
The template text is what is stored and what ravion project config pull exports, so the file round-trips unchanged. ravion project config apply orders stack runs so producers run first and rejects reference cycles. For addresses across environments and projects, expressions, and how references resolve, see output references.

Use existing infrastructure instead of a module reference

Every dependency input (network, cluster, and other inputs typed $ref:<module-type>) is backed by a set of mapped inputs — the account, region, VPC, subnet, listener, and other values the module normally copies from the referenced module. To point a module at infrastructure Ravion doesn’t manage, set the dependency input to null and set those mapped inputs directly as sibling keys:
ravion.yaml
Run ravion module schema <module-type> to see the mapped input keys for each dependency: they’re listed under that dependency input’s mapped_inputs. For a full example with an imported database, see Import into a standard module.

Agent tips

Use these rules when an agent edits a project config file. Never hand-write a ravion.yaml from memory. Generate it with ravion project create --file for a new project or ravion project config pull --file for an existing project so it carries the current header, comments, and links, then edit it.

Required workflow

  1. Check the project config schema before editing:
  1. List available module definitions before adding a module:
  1. Inspect the input schema before adding or editing a module instance:
  1. Preview every change before applying it:
  1. Apply only after the dry run is correct and approved. With the pulled file’s autoapprove: true, stack runs whose plan has no destructive changes go straight through; runs that destroy or replace resources wait at the approval step:
Pass --autoapprove=false when you want to review every plan before it applies:
  1. After applying config, use ravion pipeline run wait <id> --watch instead of repeatedly polling pipeline run get. The apply output lists a PIPELINE_RUN_ID for every stack run it starts, followed by the exact wait command to run. Work through the commands in the printed order, which is dependency order:
  1. Follow application deployments the same way, with ravion deploy wait <deployment-id> --watch instead of polling deploy get.

Helpful hints

  • Pull the latest live config anytime with ravion project config pull <project-id> --file ravion.yaml.
  • Pulled files set autoapprove: true, so plans without destructive changes apply without waiting for approval while plans that destroy or replace resources wait. Pass --autoapprove=false, or set autoapprove: false in the file, when a human should review every Terraform plan.
  • To iterate on one target, pass --environment-id, --environment-given-id, --module-instance-id, or --module-given-id.
  • If a schema check, dry run, or apply fails unexpectedly, file it with ravion report bug "<what happened>" --command "<the command that failed>". Include the exact error text and the project, environment, and module instance IDs involved. See Report bugs and feedback.

Module editing rules

  • Treat the config file as the source of truth for the current task.
  • Preserve existing IDs, givenId values, module versions, and Ravion app links unless asked to change them.
  • Tailor recommended settings to the target environment.
  • Ask about important settings that cannot be inferred with high confidence.
  • Ask before production-impacting changes such as public access, deletion protection, backup retention, capacity, region, or networking exposure.

Do not

  • Copy module inputs from unrelated files or examples.
  • Invent fields that are not present in the CLI schema output.
  • Apply changes without a successful dry run first.
  • Poll ravion pipeline run get or ravion deploy get in a loop. Use the matching wait --watch command instead.

Schema reference

Use this reference when you author project config files or generate project configuration from another system. For a compact, machine-readable version, fetch https://api.ravion.com/projects/config/schema.md.

Legend

ProjectConfig

User-authored project config file consumed by ravion projects config apply --file.
Project.ApplyProjectConfigProject
Project metadata to update before applying environment configuration.See: Project
Project.ProjectConfigFileEnvironment[]
required
Environment configuration blocks to apply.See: Environment
boolean
Pass autoapprove=true to the stack change pipeline runs applying this file starts, so plans without destructive changes apply without waiting at the approval step. Plans that destroy or replace resources still wait for approval. The CLI’s --autoapprove flag overrides this value in both directions: --autoapprove=false makes every run wait at its approval gate even when the file sets autoapprove: true.

Project

Writable project metadata accepted by project config apply.
string
Existing project ID. When provided, it must match the project in the route.
string
User-provided project identifier. When provided, it must match the project in the route. When the route identifier does not resolve to an existing project, givenId is required and must equal it, which confirms the config intends to create that project.
string
string

Environment

Environment block authored in project config files.
string
Existing environment ID.
string
User-provided environment identifier.
string
string
Project.ProjectConfigFileModuleInstance[]
required

ModuleInstance

Module instance shape authored in project config files.
string
Existing module instance ID. Non-empty IDs must resolve to an existing module.
string
User-provided unique identifier. Must be unique within environment.
string
string
string
Module type identifier.
string
Semantic module version string.
map<string,any | null>
Runtime module configuration input.

Module references

Use {moduleGivenIdRef: "..."} inside module input fields that reference another module. Use givenId values for the project, environment, and module segments.