thousands-minister-25997
11/06/2025, 11:40 AMPulumi.<stack>.yaml):
pulumi stack init "$STACK_NAME" --secrets-provider="<awskms://alias/pulumi?region=$AWS_REGION>"
On subsequent pipeline runs, since the stack already exists, I skip the init step and simply run:
pulumi stack select "$STACK_NAME"
pulumi config set ...
However, the second run fails with:
error: passphrase must be set with PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE environment variables
It seems that because the CI runner is ephemeral and does not retain the Pulumi.<stack>.yaml file from the previous run, Pulumi cannot detect the KMS secrets provider and defaults to the passphrase-based mode.
Has anyone encountered this issue and can give me guidance please ?echoing-dinner-19531
11/06/2025, 11:46 AMechoing-dinner-19531
11/06/2025, 11:47 AMmodern-zebra-45309
11/06/2025, 11:52 AMPulumi.<stack>.yaml file, including the reference to your secrets provider:
pulumi select $MY_STACK
pulumi config refreshthousands-minister-25997
11/06/2025, 2:05 PMpulumi login "$PULUMI_BACKEND_URL"
2. checking if stack exits, if doesn't
pulumi stack init "$STACK_NAME" \
--secrets-provider="<awskms://alias/pulumi?region=$AWS_REGION>"
3. if exits,
pulumi stack select "$STACK_NAME"
pulumi config refresh --non-interactivethousands-minister-25997
11/06/2025, 2:07 PMEven then I get the error [pipeline logs below]
🔐 Logging in to Pulumi backend...
Logged in to runner-a8sxq5jkx-project-70914294-concurrent-0-55xjfs2n as root (s3://ubik-fragment-wizard-example-pulumi-state-management)
🔎 Checking if Pulumi stack 'newrelic-sandbox-infrastructure' exists...
✅ Stack 'newrelic-sandbox-infrastructure' already exists.
♻️ Attempting to refresh configuration from backend...
error: getting latest configuration: no previous deployment
ℹ️ Config refresh skipped (stack may not have been deployed yet).
✅ New Relic user key retrieved from Secrets Manager
🔧 Setting Pulumi configuration values...
🔹 Configuring New Relic credentials...
error: passphrase must be set with PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE environment variablesmodern-zebra-45309
11/06/2025, 2:22 PMmodern-zebra-45309
11/06/2025, 2:23 PMmodern-zebra-45309
11/06/2025, 2:24 PMechoing-dinner-19531
11/06/2025, 2:26 PMpulumi stack change-secrets-provider to reset the secret providerthousands-minister-25997
11/06/2025, 2:43 PMinit and no config refresh and for when it exists then config refresh