victorious-answer-68580
06/01/2024, 12:31 AM+ pulumi:pulumi:Stack template-shooter-dev create
Outputs:
k8sIds: [
[0]: "Local Deployment"
]
Resources:
+ 1 to create
victorious-answer-68580
06/03/2024, 5:55 PMimport { InlineProgramArgs, LocalWorkspace } from "@pulumi/pulumi/automation";
import * as docker from "@pulumi/docker";
const run = async () => {
// This is our pulumi program in "inline function" form
const pulumiProgram = async () => {
const ubuntu = new docker.RemoteImage("ubuntu", { name: "ubuntu:precise" });
return {
hello: "world2",
// tagUrn: tag.urn,
};
};
// Create our stack
const args: InlineProgramArgs = {
stackName: "dev",
projectName: "pulumi-auto",
program: pulumiProgram
};
// create (or select if one already exists) a stack that uses our inline program
const stack = await LocalWorkspace.createOrSelectStack(args, {
envVars: { PULUMI_CONFIG_PASSPHRASE: "" }
});
await stack.preview({
onOutput: (out) => console.log(out)
});
};
run();
victorious-answer-68580
06/03/2024, 5:59 PMts-node
is used for both (10.9.2
)
I've tried running both scripts from both vscode project terminals to make sure some lingering environment variables aren't affecting thingsvictorious-answer-68580
06/03/2024, 6:11 PMvictorious-answer-68580
06/03/2024, 8:50 PM@pulumi/<other>
packages having their dependencies "@pulumi/pulumi@^3.0.0", "@pulumi/pulumi@^3.25.0":
resolve to the first version of @pulumi/pulumi
that I installed (3.112.0
) and when I upgraded @pulumi/pulumi
direct dependency, it added an additional dependency 3.118.0
, so two different modules were being referenced (one in node_modules/@pulumi/pulumi
and the other in packages/deployment/node_modules/@pulumi/pulumi
), causing issues with the AsyncLocalStorage being synced. the solution was to consolidate the @pulumi/pulumi
dependency in my yarn.lock
file, and that it seems to be a bug with older versions of yarn (which I'm using still): https://github.com/yarnpkg/yarn/issues/8068