2019-09-30 14:02:10 -07:00
---
2022-12-08 15:41:39 -08:00
title_tag: "Environment Variables | Pulumi CLI"
2020-11-10 11:06:24 -08:00
meta_desc: A list of different environment variables the Pulumi CLI supports.
2023-05-15 15:25:28 -07:00
title: Environment variables
h1: Pulumi CLI environment variables
2023-06-08 16:15:52 -07:00
meta_image: /images/docs/meta-images/docs-meta.png
2023-05-15 15:25:28 -07:00
menu:
cli:
weight: 2
aliases:
- /docs/reference/cli/environment-variables/
2019-09-30 14:02:10 -07:00
---
2023-05-17 21:44:59 -07:00
< dl class = "tabular tabular-5-col break-words" >
2020-11-10 11:06:24 -08:00
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_AUTOMATION_API_SKIP_VERSION_CHECK
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
Skips the minimum CLI version check used by Automation API to ensure compatibility. We do not recommend using this variable as it may result in unexpected behavior or confusing error messages from Automation API.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_AUTOMATION_API_SKIP_VERSION_CHECK=true< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_ACCESS_TOKEN
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2023-04-11 13:40:50 -07:00
Set this environment variable to authenticate into the Pulumi Cloud backend and bypass the access
2021-10-14 11:10:39 -07:00
token prompt when running {{% md %}}`pulumi login` {{% /md %}}.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_ACCESS_TOKEN="your-access-token"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_BACKEND_URL
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2023-05-15 15:25:28 -07:00
Set this environment variable to use a specified backend instead of the default backend. See < a href = "/docs/concepts/state" > State and Backends< / a > for details on valid backend URLs.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_BACKEND_URL="s3://your-pulumi-state-bucket"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_CONFIG
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2023-05-15 15:25:28 -07:00
Sets < a href = "/docs/concepts/config" > configuration< / a > for < a href = "/docs/using-pulumi/testing/unit" > unit testing< / a > . Must be in JSON format.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< p >
< strong > This environment variable is ignored during normal Pulumi operations -- e.g., < code > up< / code > , < code > preview< / code > , etc.< / strong >
< / p >
2022-06-30 15:23:33 +02:00
< pre > < code class = "text-xs" > PULUMI_CONFIG="{'project:myTag':'val1','project:mySecret':'val2'}"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
PULUMI_CONFIG_PASSPHRASE
< / span >
< / dt >
< dd >
< p >
Set this as an environment variable to protect and unlock your configuration values and secrets. Your passphrase
is used to generate a unique key for your stack, and configuration and encrypted state values are then encrypted
2021-10-14 11:10:39 -07:00
using < code > AES-256-GCM< / code > .
2020-11-10 11:06:24 -08:00
Read < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #secrets -and-pluggable-encryption" > the change log</ a >
2023-05-15 15:25:28 -07:00
and < a href = "/docs/concepts/config" > Configuration and Secrets< / a > to learn more about Pulumi's configuration
2020-11-10 11:06:24 -08:00
and secrets management system.
< / p >
< pre > < code class = "text-xs" > PULUMI_CONFIG_PASSPHRASE="your-passphrase"< / code > < / pre >
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_CONFIG_PASSPHRASE_FILE
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
An alternative method to providing < code > PULUMI_CONFIG_PASSPHRASE< / code > . Set this to the path of a file that contains the passphrase value.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_CONFIG_PASSPHRASE_FILE="/tmp/passphrase.txt"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_CONSOLE_DOMAIN
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2023-04-11 13:40:50 -07:00
Overrides the domain used when generating links to the Pulumi Cloud.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_CONSOLE_DOMAIN="yourhost.domain.com"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_DEBUG_PROMISE_LEAKS
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #0166 -2018-11-28" >< code > v0.12.2</ code ></ a > ,
the promise leak experience has been improved and shows a simple error message. Set this environment variable to
get more verbose error messages when debugging promise leaks.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_DEBUG_PROMISE_LEAKS=true< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_ENABLE_LEGACY_APPLY
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #100 -beta1-2019-08-13" >< code > 1.0.0-beta1</ code ></ a > ,
input properties are no longer propagated to missing output properties during a < code > pulumi preview< / code > . If this causes issues
in your Pulumi program, set this to < code > true< / code > to enable the old behavior.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_ENABLE_LEGACY_APPLY=true< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
2020-12-31 10:33:32 +11:00
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_ENABLE_LEGACY_DIFF
2020-12-31 10:33:32 +11:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #01723 -2019-07-16" >< code > v0.17.23</ code ></ a > ,
the detection of differences between the actual and desired state of a resource is left entirely up to that resource's
provider. This change can expose bugs in resource providers that lead to diffs being present even if the desired
configuration matches the actual state of the resource. Set this to < code > 1< / code > or < code > true< / code > to enable the old diff behavior.
2020-12-31 10:33:32 +11:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_ENABLE_LEGACY_DIFF=true< / code > < / pre >
2020-12-31 10:33:32 +11:00
< / dd >
2020-11-10 11:06:24 -08:00
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #01618 -2019-03-01" >< code > v0.16.18</ code ></ a > ,
a fix has been released to prevent the Pulumi CLI from loading the newest plugin for a resource provider instead of
the requested version. This has the potential to disrupt users that previously had working configurations. Set this
environment variable to opt into the legacy plugin load behavior.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH=true< / code > < / pre >
< / dd >
< dt >
< span class = "font-mono" >
PULUMI_HOME
< / span >
< / dt >
< dd >
< p >
Overrides the folder where the Pulumi CLI stores its artifacts: plugins, workspaces, templates, and
credentials file. By default, artifacts are stored next to Pulumi binaries in < code > ~/.pulumi< / code > .
< / p >
< pre > < code class = "text-xs" > PULUMI_HOME="/path/to/artifacts"< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
< dt >
< span class = "font-mono" >
PULUMI_PREFER_YARN
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
Set this environment variable to opt-in to using < code > yarn< / code > instead of < code > npm< / code > for installing Node.js dependencies.
2020-11-10 11:06:24 -08:00
< / p >
< pre > < code class = "text-xs" > PULUMI_PREFER_YARN=true< / code > < / pre >
< / dd >
2021-10-14 11:10:39 -07:00
< dt >
< span class = "font-mono" >
PULUMI_PYTHON_CMD
< / span >
< / dt >
< dd >
< p >
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #0166 -2018-11-28" >< code > v0.16.6</ code ></ a > ,
the Pulumi CLI uses < code > python3< / code > instead of < code > python< / code > when running a Python program. Set this environment variable to
run a different Python binary.
< / p >
< pre > < code class = "text-xs" > PULUMI_PYTHON_CMD="python-version-binary"< / code > < / pre >
< / dd >
2020-11-10 11:06:24 -08:00
< dt >
< span class = "font-mono" >
PULUMI_SKIP_CONFIRMATIONS
< / span >
< / dt >
< dd >
< p >
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #200 -2020-04-16" >< code > v2.0.0</ code ></ a > ,
an explicit confirmation was required when running in non-interactive mode. Set this environment variable to
make that explicit confirmation.
< / p >
< pre > < code class = "text-xs" > PULUMI_SKIP_CONFIRMATIONS=true< / code > < / pre >
< / dd >
< dt >
< span class = "font-mono" >
2021-10-14 11:10:39 -07:00
PULUMI_SKIP_UPDATE_CHECK
2020-11-10 11:06:24 -08:00
< / span >
< / dt >
< dd >
< p >
2021-10-14 11:10:39 -07:00
As of < a href = "https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md #0179 -2019-04-30" >< code > v0.17.9</ code ></ a > ,
you may skip the Pulumi version update check by setting this environment variable.
2020-11-10 11:06:24 -08:00
< / p >
2021-10-14 11:10:39 -07:00
< pre > < code class = "text-xs" > PULUMI_SKIP_UPDATE_CHECK=true< / code > < / pre >
2020-11-10 11:06:24 -08:00
< / dd >
2021-09-21 15:21:58 -07:00
< dt >
< span class = "font-mono" >
NO_COLOR
< / span >
< / dt >
< dd >
< p >
The presence of this environment variable (regardless of its value) strips color ANSI codes from text
output to the terminal. See < a href = "https://no-color.org/" > https://no-color.org/< / a > for more details.
When used with Automation API, this environment variable will strip color directives from the event logs.
< / p >
< pre > < code class = "text-xs" > NO_COLOR< / code > < / pre >
< / dd >
2020-11-10 11:06:24 -08:00
< / dl >