{"record":{"id":"88731dbd3f6003bf","repo":"pulumi/pulumi","slug":"validating-stack-config-w-88731d","errorCode":null,"errorMessage":"validating stack config: %w","messagePattern":"validating stack config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/operations/watch.go","lineNumber":149,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"gathering environment metadata: %w\", err)\n\t\t\t}\n\t\t\tcmdutil.SetStringSpanAttributes(ctx, m.Environment)\n\n\t\t\tdecrypter := sm.Decrypter()\n\t\t\tencrypter := sm.Encrypter()\n\n\t\t\tstackName := s.Ref().Name().String()\n\t\t\tconfigErr := pkgWorkspace.ValidateStackConfigAndApplyProjectConfig(\n\t\t\t\tctx,\n\t\t\t\tstackName,\n\t\t\t\tproj,\n\t\t\t\tcfg.Environment,\n\t\t\t\tcfg.Config,\n\t\t\t\tencrypter,\n\t\t\t\tdecrypter)\n\t\t\tif configErr != nil {\n\t\t\t\treturn fmt.Errorf(\"validating stack config: %w\", configErr)\n\t\t\t}\n\n\t\t\topts.Engine = engine.UpdateOptions{\n\t\t\t\tParallelDiff:              env.ParallelDiff.Value(),\n\t\t\t\tLocalPolicyPacks:          engine.MakeLocalPolicyPacks(policyPackPaths, policyPackConfigPaths),\n\t\t\t\tParallel:                  parallel,\n\t\t\t\tDebug:                     debug,\n\t\t\t\tRefresh:                   refresh,\n\t\t\t\tUseLegacyDiff:             env.EnableLegacyDiff.Value(),\n\t\t\t\tUseLegacyRefreshDiff:      env.EnableLegacyRefreshDiff.Value(),\n\t\t\t\tDisableProviderPreview:    env.DisableProviderPreview.Value(),\n\t\t\t\tDisableResourceReferences: env.DisableResourceReferences.Value(),\n\t\t\t\tDisableOutputValues:       env.DisableOutputValues.Value(),\n\t\t\t\tExperimental:              env.Experimental.Value(),\n\t\t\t\tSkipPluginPreInstall:      skipPluginPreInstall,\n\t\t\t}\n\n\t\t\terr = backend.WatchStack(ctx, s, backend.UpdateOperation{","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/operations/watch.go#L131-L167","documentation":"Wraps an error from stack config validation in the watch command. The decrypted/loaded config failed validation (e.g. required keys missing, invalid values, secret decryption issues).","triggerScenarios":"Running `pulumi watch` with a stack config containing invalid or missing required values, wrong namespace keys, or undecryptable secrets (bad secrets provider/passphrase).","commonSituations":"Malformed config entries after manual edits; switching secrets providers without re-encrypting; typos in config keys.","solutions":["Run `pulumi config` to inspect the stack config values","Fix or remove invalid config keys with `pulumi config set` / `pulumi config rm`","Check the wrapped cause (%w) for which key/value failed validation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"pulumi config --show-secrets > /dev/null || { echo \"stack config invalid or secrets undecryptable\"; exit 1; }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"validating stack config\") {\n\treturn fmt.Errorf(\"fix `pulumi config` values before watching: %w\", err)\n}","preventionTips":["Run `pulumi preview` to validate config before watch","Keep secrets provider config consistent","Avoid hand-editing Pulumi.<stack>.yaml"],"tags":["cli","config","validation"],"backgroundTag":"stack-config-validation-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}