Skip to content

Resource option: additionalSecretOutputs ​

The additionalSecretOutputs resource option specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.

This example ensures that the password generated for a database resource is an encrypted secret:

typescript
let db = new Database("new-name-for-db", { /*...*/ },
    { additionalSecretOutputs: ["password"] });

Only top-level resource properties can be designated secret. If sensitive data is nested inside of a property, you must mark the entire top-level output property as secret.

WARNING

A resource's physical ID (the id output property) cannot be included in additionalSecretOutputs. The id is a special property, not a regular output, so it is always stored in plain text in the state file. See The resource ID cannot be made secret for the implications and a workaround.

Content from the official Pulumi documentation (github.com/pulumi/docs).