Stack Config
Stack config endpoints allow you to manage configuration settings for your Pulumi stacks, including environment settings and secrets management configuration. If stack configuration is returned by the API, it used in place of the local stack config file (e.g. Pulumi.[stack].yaml
).
Stack Config Operations
The API provides endpoints for the following operations:
- Getting a stack’s configuration
- Updating a stack’s configuration
- Deleting a stack’s configuration
Get Stack Config
Retrieves the configuration settings for a specific stack.
GET /api/stacks/{organization}/{project}/{stack}/config
Parameters
Parameter | Type | In | Description |
---|---|---|---|
organization | string | path | organization name |
project | string | path | project name |
stack | string | path | stack name |
Example
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/config
Default response
Status: 200 OK
{
"environment": "string",
"secretsProvider": "string",
"encryptedKey": "string",
"encryptionSalt": "string"
}
Update Stack Config
Updates the configuration settings for a specific stack.
PUT /api/stacks/{organization}/{project}/{stack}/config
Parameters
Parameter | Type | In | Description |
---|---|---|---|
organization | string | path | organization name |
project | string | path | project name |
stack | string | path | stack name |
Request Body
The request body should be a StackConfig
object with the following fields:
Field | Type | Description |
---|---|---|
environment | string | Optional. The reference to the ESC environment to use as stack configuration |
secretsProvider | string | Optional. The secrets provider configuration |
encryptedKey | string | Optional. The encrypted key for secrets management |
encryptionSalt | string | Optional. The encryption salt used for secrets |
Example
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
--request PUT \
--data '{
"environment": "default/prod",
"secretsProvider": "default",
"encryptedKey": "key",
"encryptionSalt": "salt"
}' \
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/config
Default response
Status: 200 OK
{
"environment": "default/prod",
"secretsProvider": "default",
"encryptedKey": "key",
"encryptionSalt": "salt"
}
Delete Stack Config
Deletes the configuration settings for a specific stack.
DELETE /api/stacks/{organization}/{project}/{stack}/config
Parameters
Parameter | Type | In | Description |
---|---|---|---|
organization | string | path | organization name |
project | string | path | project name |
stack | string | path | stack name |
Example
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
--request DELETE \
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/config
Default response
Status: 204 No Content
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.