sparse-intern-71089
09/07/2023, 8:00 PMfast-yacht-78432
09/07/2023, 8:12 PMawait workspace.createStack(stackName);
await workspace.selectStack(stackName);
const stack = await workspace.stack();
I'm able to create a stack, select it, and get a summary about it if it is an instance but I don't see how to effect the state of it to do a stack up or downfull-eve-52536
09/07/2023, 8:46 PMawait workspace.stack()
returns a StackSummary typefull-eve-52536
09/07/2023, 8:47 PMconst stack = await LocalWorkspace.createOrSelectStack(localProgramArgs, workspaceArgs);
would return a Stack typefast-yacht-78432
09/07/2023, 8:53 PM.up()
with it, or is this only available using the static methods LocalWorkspace
full-eve-52536
09/07/2023, 8:57 PMup()
method exists on the Stack
type objects. So something like this should work:
const stack = await workspace.selectStack(stackName);
await stack.up();
fast-yacht-78432
09/07/2023, 9:00 PM.selectStack
returns a void
with typescriptfast-yacht-78432
09/07/2023, 9:00 PMfast-yacht-78432
09/07/2023, 9:02 PMawait
all your operations but don't expect a responsefull-eve-52536
09/07/2023, 9:02 PMworkspace
as WorkspaceArgs
. I.e:
const workspaceArgs: LocalWorkspaceOptions = {
workDir: infraDir,
envVars: {
PULUMI_K8S_ENABLE_PATCH_FORCE: 'true',
NODE_OPTIONS: '',
},
};
fast-yacht-78432
09/07/2023, 9:03 PMasync
and hit a callbackfast-yacht-78432
09/07/2023, 9:03 PM