https://pulumi.com logo
#general
Title
# general
s

swift-painter-31084

06/21/2019, 7:43 PM
Is there a good way to pass
pulumi config
values into a Cloud Function's handler code without including the pulumi package in it? I was having memory issues when I included it.
w

white-balloon-205

06/21/2019, 7:48 PM
If you read the value out into a variable first and then reference that variable, you should not need to pull in the pulumi package.
Copy code
const config = new pulumi.Config();
  const message = config.require("message");
  const b = new aws.s3.Bucket("b");
  b.onObjectCreated("n", async (ev, ctx) => {
      console.log(message)
  });
s

swift-painter-31084

06/21/2019, 7:59 PM
cool, thanks!
Actually I'm making my Function code in a separate handler file (so I can use Node 10), so I'm getting
pulumi is not defined
error on that function.