This message was deleted.
# automation-api
s
This message was deleted.
h
package.json
has the right pulumi packages I think:
Copy code
"@pulumi/aws": "^3.0.0",
        "@pulumi/awsx": "^0.22.0",
        "@pulumi/pulumi": "^2.12.0",
Hmm - this program does try to re-use stack outputs as input to a pulumi program ... I'm doing this:
Copy code
const authnOutput= new pulumi.StackReference(`...`).outputs

const args: InlineProgramArgs = {
  ...
  program: async () => authnOutput.apply((authnOutput) => createDocumentSite(authnOutput.authNDomain, authnOutput.publicKey))
};
Where
createDocumentSite
creates resources, but notice I'm using
apply
to get stack output values ... Probably bad?
f
Try moving the `const authnRef = new pulumi.StackReference(...)`` line to inside your program. You cannot create any resources outside of that program() method
h
That helped me make progress, thanks! I ended up with:
Copy code
const args: InlineProgramArgs = {
  ...
  program: async () => {
    const authnOutput= new pulumi.StackReference(`...`).outputs
    authnOutput.apply((authnOutput) => createDocumentSite(authnOutput.authNDomain, authnOutput.publicKey))
  }
};
l
Yes, any pulumi related code has to be run from within the
program
(inline function). This would include stack references. The error message could definitely be more clear here