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, secrets provider type, encrypted key, and encryption salt. 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.

    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
      The stack’s secrets provider.
    • encryptedKey string optional
      The KMS-encrypted ciphertext for the data key used for secrets encryption. Only used for cloud-based secrets providers.
    • encryptionSalt string optional
      The stack’s base64-encoded encryption salt. Only used for passphrase-based secrets providers.
    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 may include the ESC environment reference, secrets provider type, encrypted key, and encryption salt. 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.

    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
      The stack’s secrets provider.
    • encryptedKey string optional
      The KMS-encrypted ciphertext for the data key used for secrets encryption. Only used for cloud-based secrets providers.
    • encryptionSalt string optional
      The stack’s base64-encoded encryption salt. Only used for passphrase-based secrets providers.

    Responses

    200 OK
    • environment string required
      Reference to ESC environment to use as stack configuration.
    • secretsProvider string optional
      The stack’s secrets provider.
    • encryptedKey string optional
      The KMS-encrypted ciphertext for the data key used for secrets encryption. Only used for cloud-based secrets providers.
    • encryptionSalt string optional
      The stack’s base64-encoded encryption salt. Only used for passphrase-based secrets providers.
    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, including the secrets provider settings, encrypted key, encryption salt, and ESC environment reference. 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