https://pulumi.com logo
#pulumi-deployments
Title
# pulumi-deployments
b

bulky-afternoon-9964

08/16/2023, 8:31 PM
I see the
get deployments
API Response has a
secret
bool
that is set- but I don't see any examples on how to send these as a secret... https://www.pulumi.com/docs/pulumi-cloud/deployments/api/#response-1
s

sticky-translator-61903

08/16/2023, 8:34 PM
EnvironmentVariable types can have either of the following structures:
Copy code
"key": {
    "secret": "value" <-- secret environment variable
  },
  "key": "value" <-- plaintext environment variable
Here is a good example in the Deployments REST API payload: https://www.pulumi.com/docs/pulumi-cloud/deployments/api/#examples-1
Copy code
{
  "preRunCommands": [
    "go get <http://sigs.k8s.io/kind@v0.16.0|sigs.k8s.io/kind@v0.16.0>"
  ],
  "environmentVariables": {
    "AWS_REGION": "us-east-2",
    "CUSTOM_VARIABLE": "foo",
    "MY_PASSWORD": {
      "secret": "my-secret-password"
    }
  }
}
Let me know if that works for you!
b

bulky-afternoon-9964

08/16/2023, 8:35 PM
I'll give it a try now! Thanks!
Yep that worked!!!
s

sticky-translator-61903

08/16/2023, 9:25 PM
Great, glad to hear it!