Skip to main content

CreateEnvironmentInput

Create a new environment. Environments are isolated deployment contexts like production, staging, or development, each with independent secrets and configurations.

input CreateEnvironmentInput {
attributes: Map
decommissionProtection: Boolean
description: String
id: String!
name: String!
separationOfDuty: Boolean
}

Fields

CreateEnvironmentInput.attributes ● Map scalar {#attributes}

Key-value attributes for this environment. Keys and values must be strings. Must conform to the organization's custom attributes for the environment scope.

CreateEnvironmentInput.decommissionProtection ● Boolean scalar {#decommission-protection}

When true, blocks decommissionEnvironment and any per-instance deployment with action: DECOMMISSION against this environment. Disable it via updateEnvironment before tearing down. Defaults to false.

CreateEnvironmentInput.description ● String scalar {#description}

An optional description of the environment's purpose

CreateEnvironmentInput.id ● String! non-null scalar {#id}

A short, memorable identifier for looking up this environment in the API and CLI. This becomes the second segment of package identifiers. For example, project 'ecomm' with environment 'prod' and component 'db' creates 'ecomm-prod-db'. Use familiar names like 'prod', 'staging', 'dev'—human-readable, not a UUID. Max 20 characters, lowercase alphanumeric only (a-z, 0-9). Immutable after creation.

CreateEnvironmentInput.name ● String! non-null scalar {#name}

A human-readable name for the environment

CreateEnvironmentInput.separationOfDuty ● Boolean scalar {#separation-of-duty}

When true, approveDeployment rejects any approval from the account or service account that proposed the deployment — a proposal in this environment has to be approved by a second reviewer. Proposers can still reject their own proposals with rejectDeployment. Defaults to false.

Member Of

createEnvironment mutation