Update environment variables with the Houston API

Update environment variables

To programmatically update environment variables, you need:

  • A Deployment ID. To retrieve this value, run astro deployment list or request the id value in the workspaceDeployment query.
  • A Deployment release name: To retrieve this value, run astro deployment list in your Workspace. Alternatively, you can copy the Release name from your Deployment’s Settings tab in the Astro Private Cloud UI.

Then, in your GraphQL Playground, run the following:

1mutation UpdateDeploymentVariables {
2 updateDeploymentVariables(
3 deploymentUuid: ID! = "<deployment-id>",
4 releaseName: String! = "<deployment-release-name>",
5 environmentVariables: [
6 {key: "<environment-variable-1>",
7 value: "<environment-variable-value-1>",
8 isSecret: <true-or-false>},
9 {key: "<environment-variable-2>",
10 value: "<environment-variable-value-2>",
11 isSecret: <true-or-false>}
12 ]
13 ) {
14 key
15 value
16 isSecret
17 }
18}