Hi! I'm trying out ESC. Liking the concept so far ...
# esc
g
Hi! I'm trying out ESC. Liking the concept so far but I've hit an issue. My repo uses a private NPM library. I've added
NPM_TOKEN
to the environment variables in my ESC environment, and imported the ESC environment to my stack. When I run
preview
in Pulumi Cloud Deployments, the
installing dependencies
step fails (can't find the private library). But if I add
NPM_TOKEN
as an environment variable directly to the Pulumi Deployments configuration, it works. Is it expected that environment variables in ESC are not available before the actual
pulumi preview
command runs?
r
Hi @gentle-account-95888! Yeah, what you're running into is a known issue at the moment unfortunately. We need to extend the support for ESC to earlier steps in Deployments for this to work. Current workaround would be to skip the automatic dependency installation step in your deployment settings and then use a pre-run command like
pulumi login && pulumi env run {org/env] -- npm install
g
Thanks!