hi guys how can i configure a stack programmatical...
# typescript
b
hi guys how can i configure a stack programmatically to have deployment configurations so when i want to destroy it from the UI it will just go to the env variables i tried to add my the new stack i created to an existing environment
Copy code
await createStack.addEnvironments(environment)
didnt configure the deployment settings i also did explicit configuration
Copy code
await createStack.setConfig(key, { value: value });
didnt update the deployment config also tried
Copy code
await createStack.refreshConfig()
and just nothing happens when i see the stack in the pulumi's UI and try to destroy it it wants me to reconfigure it i noticed that only when i attach a stack to a git repo im able to destroy it but i dont want to create a git repo per stack convention please help
w
Deployment Settings are managed separately from stack config, so the things you tried above won't directly update/manage the Deployment Settings. Today - there are a few ways to manage deployment settings: 1. REST API - https://www.pulumi.com/docs/pulumi-cloud/deployments/api/#patch-settings 2. The
DeploymentSettings
resource in the Pulumi Service provider: https://www.pulumi.com/registry/packages/pulumiservice/api-docs/deploymentsettings/. 3. The console UI as you already discovered. This issue is tracking adding Deployment Settings management directly to Automation API - (and perhaps you are the user who just commented on it as well!): https://github.com/pulumi/pulumi/issues/14599.