Skip to main content

inforge preview

Preview infrastructure changes for a stack using the Pulumi Automation API.

Usage

inforge preview <env> [flags]

The environment is a required positional argument (e.g. prd) — it is the Pulumi stack name.

Flags

FlagDefaultDescription
--stack-configinforge.<env>.yamlPath to the stack config file (optional; a missing default file means no extra config)
--output / -o"" (human)Output format: "" for human-readable, json for structured JSON
--allow-multiplefalseAllow running when multiple environments have changes detected
--config / -c./inforge.yamlPath to the project config file
--dir / -d./resourcesPath to the resources directory

Output

Human-readable (default)

Streams Pulumi's progress output to stdout — shows each resource being evaluated.

JSON (--output json)

Emits a structured summary to stdout:

{
"environment": "prd",
"summary": {
"create": 2,
"update": 0,
"delete": 0,
"same": 5
}
}

The GitHub Actions preview workflow uses this to render the HTML report in $GITHUB_STEP_SUMMARY and as a PR comment.

Examples

# Human-readable preview
inforge preview --stack prd --stack-config inforge.prd.yaml

# JSON output for CI
inforge preview --stack prd --stack-config inforge.prd.yaml --output json

Exit codes

CodeMeaning
0Preview succeeded
1Preview failed or error