https://dagster.io/ logo
Title
h

Henri Blancke

02/13/2023, 11:08 PM
👋 is there a way to set environment variables in cloud using the
dagster-cloud
cli?
d

daniel

02/13/2023, 11:10 PM
Hi Henri - there's a GraphQL API call that can also add them programatically (we'd happy to send you a sample query if that would be helpful) - and we're planning to add a way to add them from the
dagster-cloud
command-line but that's not quite ready yet
💡 1
h

Henri Blancke

02/13/2023, 11:11 PM
That'd be helpful @daniel
and thanks for the speedy response 🙂
d

daniel

02/13/2023, 11:16 PM
I believe something like this would add the secret to the full deployment that you run it on (locationNames is optional)
mutation CreateSecret($secretName: String!, $secretValue: String!, $locationNames: [String!]) {
    createSecret(secretName: $secretName, secretValue: $secretValue, scopes: {"fullDeploymentScope": true}, locationNames: $locationNames) {
         __typename
    }
}
There's an example of making a graphql request against Dagster cloud here: https://github.com/dagster-io/dagster/discussions/7772
h

Henri Blancke

02/13/2023, 11:18 PM
:yay: thanks!