Skip to content

Incorrect JSON quoting in PULUMI_CONFIG example on Environment Variables page #15490

@davidspielmann

Description

@davidspielmann

I would like to report a possible inconsistency or point of confusion I encountered with the PULUMI_CONFIG environment variable described here: content/docs/iac/cli/environment-variables.md

The current example shows:
PULUMI_CONFIG="{'project:myTag':'val1','project:mySecret':'val2'}"

When I tried setting this in my environment and running pulumi preview, I got a JSON parsing error:

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes

According to the documentation, I expected setting PULUMI_CONFIG would be ignored during normal operations like pulumi preview, but instead, it appears to have been parsed and caused an error.

I found that it works correctly when the environment variable is set as follows:
export PULUMI_CONFIG='{ "project:myTag": "val1", "project:mySecret": "val2" }'

It may be helpful to do two things:

  • Update the example to use valid JSON, especially since the current format would cause runtime errors.
  • Clarify what the documentation means by "PULUMI_CONFIG is ignored during normal operations". Currently, it seems that the presence (with invalid JSON) of this environment variable can still cause a failure during commands like preview.

Metadata

Metadata

Labels

needs-triageNeeds attention from the triage team

Type

No type

Projects

Status

🤔 Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions