[SOLVED] I solved the above issue mostly, but I'm ...
# automation-api
[SOLVED] I solved the above issue mostly, but I'm still having an issue that doing a stack preview/up only resolves 1 resource (the stack itself):
Copy code
+  pulumi:pulumi:Stack template-shooter-dev create 
    k8sIds: [
        [0]: "Local Deployment"

    + 1 to create
I've narrowed this down to a working environment issue. I can create a separate project with the automation api script and I see the docker remoteimage resource show up in the preview. I have ensured that both repos have the same npm pulumi versions, have the same tsconfig.json, and even tried using this script in the original repo (where it fails to show the docker resource)
Copy code
import { 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, {

  await stack.preview({
    onOutput: (out) => console.log(out)

I've wiped build outputs (ts lib/dist folders, tsconfig.tsbuildinfo) and node_modules, and regenerating as needed (TS isn't transpiled ahead of time for either project; the same version of
is used for both (
) I've tried running both scripts from both vscode project terminals to make sure some lingering environment variables aren't affecting things
my original repo uses yarn workspaces but the new test one didn't, so I tried mimicking the workspace setup, but the new one still shows the docker resource 😞
this issues seems to be caused due to my
packages having their dependencies
"@pulumi/pulumi@^3.0.0", "@pulumi/pulumi@^3.25.0":
resolve to the first version of
that I installed (
) and when I upgraded
direct dependency, it added an additional dependency
, so two different modules were being referenced (one in
and the other in
), causing issues with the AsyncLocalStorage being synced. the solution was to consolidate the
dependency in my
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