stategraph plan

stategraph plan is a pull request comment, not a terminal command: it runs a plan to preview infrastructure changes before an apply.

  • The plan runs the workflow in .stategraph/config.yml.
  • Orchestration stores the plan files for the later apply. storage sets where.
  • With access control, the plan list of a policy sets who can run it. By default, everyone can.

Usage

stategraph plan [tag-query]

Without a tag query, the command plans every changed directory. A tag query filters by dir:<path>, workspace:<name>, or tag name, with and, or, and not.

When the tag query has only dir: and workspace: tags and no not, Orchestration plans the named directories again, even when their previous plan found no changes.

Examples

All changes:

stategraph plan

A specific directory:

stategraph plan dir:staging

A specific workspace:

stategraph plan workspace:production

Multiple directories:

stategraph plan dir:app or dir:database

A complex tag query:

stategraph plan production and dir:us-east-1