CLI Reference
Command-line options for uploading Terraform state with the Cora CLI.
The Cora CLI is a single static binary that uploads Terraform state to your Cora organization. It works on macOS, Linux, Windows, and in CI environments.
Installation
Download the latest release for your platform from the Cora CLI releases page.
For detailed installation instructions, see the CLI repository README.
Verify the installation:
cora versionAuthentication
Set the CORA_TOKEN environment variable with a token from Settings → Tokens:
export CORA_TOKEN="cora_..."You can also pass the token directly with --token.
Commands
cora upload
Upload Terraform state to a workspace.
terraform state pull | cora upload --workspace my-appFlags:
| Flag | Description |
|---|---|
--workspace | Target workspace name (required) |
--token | API token (overrides CORA_TOKEN) |
--api-url | Override the Cora API base URL |
cora version
Print the installed CLI version.
cora versionCI usage
For CI pipelines, store your token as a secret and export it before running the upload:
- name: Upload state to Cora
env:
CORA_TOKEN: ${{ secrets.CORA_TOKEN }}
run: |
terraform state pull | cora upload --workspace productionReleases
Download binaries and view changelogs at github.com/TheCoraApp/cora-cli/releases.