Environments
Environments are a new feature since v2.5.0. They are useful when you want to create multiple RunsOn stacks that are isolated from each other, with different IAM permissions or stack configurations, etc. This allows you to map existing environments and requirements (e.g. production, staging, development) to different RunsOn stacks.
Each environment will also get linked to its own private GitHub App, which means you can enable a different set of repositories for each environment if needed.
How it works
At installation time, you can specify the environment name for your RunsOn stack. By default the environment is named production
, and is the one targeted by the workflow if no env
label is specified.
Then, in your workflow, you can specify the environment name with the env
label.
Example
Assuming you have created a RunsOn stack with the Environment
parameter set to staging
, you can target it with the following workflow definition:
All other RunsOn stacks will ignore this workflow.
Considerations
Each RunsOn stack incurs a cost (AWS costs + regularly upgrading the stack), and we recommend that you create as few as possible. The majority of clients only create one stack.