Skip to main content
Pulumi logo Pulumi logo
  1. Docs
  2. Secrets & Configuration
  3. Concepts
  4. Built-in Functions
  5. fn::toYAML

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

    fn::toYAML: value-to-encode
    

    Parameters

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

    Returns

    The encoded value.

      The infrastructure as code platform for any cloud.