stategraph apply
stategraph apply is a pull request comment, not a terminal command: it applies the planned changes to your infrastructure. It runs the workflow in .stategraph/config.yml.
Prerequisites
- A successful plan, automatic or from
stategraph plan, has run first. - The pull request meets the apply requirements, unless you use
apply-force. - You have apply permission. With access control, the
applylist of a policy sets who can apply. By default, everyone can.
Usage
stategraph apply [tag-query]
Without a tag query, the command applies every stored plan. A tag query filters by dir:<path>, workspace:<name>, or tag name, with and, or, and not.
Examples
All plans:
stategraph apply
A specific directory:
stategraph apply dir:staging
A specific workspace:
stategraph apply workspace:production
Multiple directories:
stategraph apply dir:app or dir:database
A complex tag query:
stategraph apply production and dir:us-east-1
Related commands
- stategraph plan: create a plan before applying
- stategraph apply-force: apply without meeting the requirements