Skip to main content
  1. Docs
  2. Reference
  3. REST API Docs
  4. Stack Config

Stack Config

    The Stack Config API manages cloud-persisted stack configuration. These endpoints apply to service-managed stacks only. For stack config variables set during updates, see the Stack Updates API.

    Get Stack Config

    GET /api/stacks/{orgName}/{projectName}/{stackName}/config

    Retrieves the service-managed configuration for a stack. The response includes the ESC environment reference that points the stack at a service-backed configuration. If stack configuration is returned by the API, it is used in place of the local stack config file (e.g. Pulumi.[stack].yaml). Returns 404 if no service-managed configuration exists for the stack. The ‘secretsProvider’, ’encryptedKey’, and ’encryptionSalt’ fields are deprecated and should be ignored by new callers; they may carry legacy values from existing rows but no longer reflect any service behavior.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    • environment string required
      Reference to ESC environment to use as stack configuration.
    • secretsProvider string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptedKey string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptionSalt string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    Errors: 404 Stack Config

    Update Stack Config

    PUT /api/stacks/{orgName}/{projectName}/{stackName}/config

    Updates the service-managed configuration for a stack. The request body sets the ESC environment reference that points the stack at a service-backed configuration. If stack configuration is returned by the API, it is used in place of the local stack config file (e.g. Pulumi.[stack].yaml). Returns the updated configuration object. Returns 400 if the environment reference is invalid or not found. The ‘secretsProvider’, ’encryptedKey’, and ’encryptionSalt’ fields are deprecated; new callers should omit them.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    • environment string required
      Reference to ESC environment to use as stack configuration.
    • secretsProvider string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptedKey string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptionSalt string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.

    Responses

    200 OK
    • environment string required
      Reference to ESC environment to use as stack configuration.
    • secretsProvider string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptedKey string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    • encryptionSalt string optional
      Deprecated: this field is no longer used by the service. Stacks that use a service-backed configuration store all config (including secrets) in ESC, which uses its own encryption. New callers should omit this field.
    Errors: 400 invalid environment or invalid environment version or environment not found

    Delete Stack Config

    DELETE /api/stacks/{orgName}/{projectName}/{stackName}/config

    Removes the service-managed configuration for a stack — the ESC environment reference that points the stack at a service-backed configuration. If stack configuration is returned by the API, it is used in place of the local stack config file (e.g. Pulumi.[stack].yaml). Deleting the config causes the CLI to fall back to the local config file. Returns 204 with no content on success.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    204 No Content