Skip to content

fn::toYAML ​

The fn::toYAML built-in function encodes a value as its YAML representation. This can be used to encode values for use in positions that only accept strings. If any input to fn::toYAML is a secret, the encoded value is also a secret.

Declaration ​

yaml
fn::toYAML: value-to-encode

Parameters ​

PropertyTypeDescription
value-to-encodeanyThe value to encode as YAML.

Returns ​

The encoded value.

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