env group
The env group commands.
A variable group is a set of variables held once and used by several applications. The group is created and edited with these commands; which applications receive it is a separate assignment.
Nothing here deploys anything. A change reaches an application at its next
deployment, and env group get --apps lists the applications that are waiting for
one.
env group list
List the team's shared variable groups.
Usage
outplane env group listOutput
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
description | string | null | |
variables | int | How many variables it holds. |
assignments | int | How many applications use it. |
scope | string | Where the variables are injected, in words: at build and at runtime, at build only, at runtime, or nowhere. One of at build and at runtime, at build only, at runtime, nowhere. |
useInBuild | bool | |
useInRuntime | bool |
Examples
What groups exist
outplane env group listFind the id to assign
outplane env group list --json --fields name,id,assignmentsRead the groups in a pipeline
outplane env group list --json --fields name,variables,assignments{
"items": [
{
"assignments": 3,
"name": "shared",
"variables": 12
}
],
"total": 1,
"truncated": false
}What to Know
- This lists the groups, not what is in them.
env group getreports the variables, with values hidden unless asked for. - A group used neither at build nor at runtime reaches nothing. scope says so in words; useInBuild and useInRuntime are the fields to branch on.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of context.no_team. Branch on that, or on the exit status. The message is prose and changes.
env group get
Show what a group holds.
Usage
outplane env group get <GROUP> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
GROUP | string | Group name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--reveal | bool | Print the values instead of hiding them. |
--apps | bool | List the applications using the group instead of its variables. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
key | string | Without --apps. |
value | string | Masked unless --reveal was given. |
revealed | bool | |
length | int | Accurate whether or not the value is shown. |
app | string | With --apps: an application using the group. |
appId | string | With --apps. |
assignmentId | string | With --apps: the record that joins them. |
Examples
What is in a group
outplane env group get sharedWhich applications use it, and therefore what to deploy
outplane env group get shared --apps{
"items": [
{
"app": "checkout",
"appId": "618ac10a-…"
},
{
"app": "worker",
"appId": "c0345de8-…"
}
],
"total": 2,
"truncated": false
}Read the keys without the values
outplane env group get shared --json --fields name,entriesSee which applications would be affected by a change
outplane env group get shared -o textWhat to Know
- The rows are the variables. Which group they belong to, how it is scoped and how many applications use it are in the closing line, because a table of key and value has nowhere to put them.
- Resolving a name costs a list call before the read, since the detail endpoint takes an id.
- --apps answers the question the other commands leave open: a change to a group reaches its applications at their next deployment, and nothing here deploys them, so this is the list to work through.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of envgroup.not_found, envgroup.ambiguous, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.
env group create
Create a shared variable group.
Usage
outplane env group create <NAME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
NAME | string | The group's name. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--var | strings | KEY=VALUE, repeatable. |
--description | string | What the group is for. |
--build | bool | Also inject during builds. |
--build-only | bool | Inject during builds and not at runtime. Needs --build. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
description | string | null | |
variables | int | How many variables it holds. |
assignments | int | How many applications use it. |
scope | string | Where the variables are injected, in words: at build and at runtime, at build only, at runtime, or nowhere. One of at build and at runtime, at build only, at runtime, nowhere. |
useInBuild | bool | |
useInRuntime | bool | |
changed | bool |
Examples
A group two services share
outplane env group create shared --var LOG_LEVEL=info --var REGION=euBuild-time only
outplane env group create buildargs --var NPM_TOKEN=x --build --build-onlyCheck the request without creating anything
outplane env group create shared --var A=1 --dry-run --json{
"changed": false,
"name": "shared",
"variables": 1
}What to Know
- A new group is assigned to nothing and therefore reaches nothing until
env group assignruns. - --build-only without --build is refused. The server would accept a group used neither at build nor at runtime, which is a mistake that looks like working configuration.
- The same reserved keys apply as anywhere else: HOSTNAME, and anything starting with OP_ or KUBERNETES_.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of envgroup.name_required, envgroup.name_invalid, envgroup.scope_empty, usage.bad_assignment, env.reserved_key, env.reserved_prefix, env.value_too_long. Branch on that, or on the exit status. The message is prose and changes.
env group set
Change a group's variables or settings.
Usage
outplane env group set <GROUP> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
GROUP | string | Group name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--var | strings | KEY=VALUE to add or replace, repeatable. |
--unset | strings | Key to remove, repeatable. |
--description | string | What the group is for. |
--build | bool | Start injecting during builds. |
--no-build | bool | Stop injecting during builds. |
--runtime | bool | Start injecting at runtime. |
--build-only | bool | Stop injecting at runtime. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
description | string | null | |
variables | int | How many variables it holds. |
assignments | int | How many applications use it. |
scope | string | Where the variables are injected, in words: at build and at runtime, at build only, at runtime, or nowhere. One of at build and at runtime, at build only, at runtime, nowhere. |
useInBuild | bool | |
useInRuntime | bool | |
changed | bool |
Examples
Add a variable
outplane env group set shared --var TIMEOUT=30Remove one
outplane env group set shared --unset TIMEOUTSee what would change, and what would stay
outplane env group set shared --var A=2 --dry-run --json{
"changed": false,
"name": "shared",
"variables": 12
}What to Know
- Every variable is sent back on every call, because the endpoint replaces the group. Concurrent edits overwrite each other and nothing detects it.
- --unset refuses a key the group does not have, rather than reporting success for a removal that removed nothing.
- A change reaches the applications using the group at their next deployment.
- Calling it with nothing to change is an error, not a no-op write.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of envgroup.not_found, envgroup.scope_empty, env.not_found, usage.bad_assignment, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.
env group assign
Give an application a group's variables.
Usage
outplane env group assign <GROUP> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
GROUP | string | Group name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--app | string | Application name or id. Defaults to the linked app. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
group | string | |
groupId | string | |
app | string | |
changed | bool | False when it was already in that state. |
Examples
Check what it would do, without doing it
outplane env group assign shared --app checkout --dry-run --json{
"app": "checkout",
"changed": false,
"group": "shared"
}Assign a group
outplane env group assign shared --app checkoutRead the result in a pipeline
outplane env group assign shared --app checkout --json --fields group,app,changedWhat to Know
- Idempotent. Assigning something already assigned reports changed false and exits 0, and so does unassigning something that was not assigned.
- The API removes an assignment by the assignment's own id, not by the pair, so the assignment is looked up first. That is one extra request and it is what turns a missing assignment into a sentence rather than a 404.
- The change reaches the application at its next deployment.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of envgroup.not_found, app.not_found, context.no_app. Branch on that, or on the exit status. The message is prose and changes.
env group unassign
Stop an application using a group.
Usage
outplane env group unassign <GROUP> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
GROUP | string | Group name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--app | string | Application name or id. Defaults to the linked app. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
group | string | |
groupId | string | |
app | string | |
changed | bool | False when it was already in that state. |
Examples
Check what it would do, without doing it
outplane env group unassign shared --app checkout --dry-run --json{
"app": "checkout",
"changed": false,
"group": "shared"
}Unassign a group
outplane env group unassign shared --app checkoutRead the result in a pipeline
outplane env group unassign shared --app checkout --json --fields group,app,changedWhat to Know
- Idempotent. Assigning something already assigned reports changed false and exits 0, and so does unassigning something that was not assigned.
- The API removes an assignment by the assignment's own id, not by the pair, so the assignment is looked up first. That is one extra request and it is what turns a missing assignment into a sentence rather than a 404.
- The change reaches the application at its next deployment.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of envgroup.not_found, app.not_found, context.no_app. Branch on that, or on the exit status. The message is prose and changes.
env group delete
Permanently delete a variable group.
Usage
outplane env group delete <GROUP> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
GROUP | string | Group name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
-y, --yes | bool | Acknowledge the deletion. Not sufficient on its own. |
--confirm-name | string | The group's name, typed again. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
description | string | null | |
variables | int | How many variables it holds. |
assignments | int | How many applications use it. |
scope | string | Where the variables are injected, in words: at build and at runtime, at build only, at runtime, or nowhere. One of at build and at runtime, at build only, at runtime, nowhere. |
useInBuild | bool | |
useInRuntime | bool | |
changed | bool |
Examples
See what would be lost
outplane env group delete shared --dry-runThe confirmed form
outplane env group delete shared --yes --confirm-name sharedCheck what the name resolves to, and who uses it
outplane env group delete shared --dry-run --json{
"assignments": 0,
"changed": false,
"name": "shared"
}What to Know
- Never prompts. Without confirmation it exits 4 and returns the command to replay in the error's confirm_command field.
- Under a detected agent harness it exits 4 even with both flags.
- A group with assignments cannot be deleted: the server refuses and says so. Unassign it from every application first, which
env group get --appslists.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
4 | confirmation_required | A destructive operation stopped. Replay the command in confirm_command. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of confirmation.required, envgroup.confirm_name_mismatch, envgroup.not_found, envgroup.in_use. Branch on that, or on the exit status. The message is prose and changes.