Prerequisites
- You’ve logged in to the Porter CLI after running porter auth login
- You’re connected to the correct project by running porter config set-project
- You’re connected to the correct cluster by running porter config set-cluster
- The project has Stacks enabled
porter stack contains commands to interact with Porter Stacks.
Env groups
- To add an env group to a stack, the following command is used:
- To remove an existing env group from a stack, the following command is used:
info
Once an env group has been created and added to a stack using this command, it can be updated using the porter env-group update command.Examples
- To add a new env group to a stack named
my-stackin theprodnamespace, run the following command:
- To add a new env group to a stack named
my-stackin theprodnamespace with secret variables, run the following command:
- To add a new env group to a stack named
my-stackin theprodnamespace and link it to themy-web-appin the same stack, run the following command:
Flags
--name(string) name of the stack-nor--normal(stringArray) list of normal variables, in the form VAR=VALUE, to set-sor--secret(stringArray) list of secret variables, in the form VAR=VALUE, to set--linked-apps(stringArray) list of apps in the stack to link the env group to--namespace(string) namespace of the stack (default “default”)

