@pulumi/pulumi
    Preparing search index...

    Class Config

    Config is a bag of related configuration state. Each bag contains any number of configuration variables, indexed by simple keys, and each has a name that uniquely identifies it; two bags with different names do not share values for variables that otherwise share the same key. For example, a bag whose name is pulumi:foo, with keys a, b, and c, is entirely separate from a bag whose name is pulumi:bar with the same simple key names. Each key has a fully qualified names, such as pulumi:foo:a, ..., and pulumi:bar:a, respectively.

    Index

    Constructors

    Properties

    name: string

    name is the configuration bag's logical name and uniquely identifies it. The default is the name of the current project.

    Methods

    • get loads an optional configuration value by its key, or undefined if it doesn't exist.

      Type Parameters

      • K extends string = string

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: StringConfigOptions<K>

        An options bag to constrain legal values.

      Returns K | undefined

    • getBoolean loads an optional configuration value, as a boolean, by its key, or undefined if it doesn't exist. If the configuration value isn't a legal boolean, this function will throw an error.

      Parameters

      • key: string

        The key to lookup.

      Returns boolean | undefined

    • getNumber loads an optional configuration value, as a number, by its key, or undefined if it doesn't exist. If the configuration value isn't a legal number, this function will throw an error.

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: NumberConfigOptions

        An options bag to constrain legal values.

      Returns number | undefined

    • getObject loads an optional configuration value, as an object, by its key, or undefined if it doesn't exist. This routine simply JSON parses and doesn't validate the shape of the contents.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to lookup.

      Returns T | undefined

    • getSecret loads an optional configuration value by its key, marking it as a secret, or undefined if it doesn't exist.

      Type Parameters

      • K extends string = string

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: StringConfigOptions<K>

        An options bag to constrain legal values.

      Returns Output<K> | undefined

    • getSecretBoolean loads an optional configuration value, as a boolean, by its key, making it as a secret or undefined if it doesn't exist. If the configuration value isn't a legal boolean, this function will throw an error.

      Parameters

      • key: string

        The key to lookup.

      Returns OutputInstance<boolean> | undefined

    • getSecretNumber loads an optional configuration value, as a number, by its key, marking it as a secret or undefined if it doesn't exist. If the configuration value isn't a legal number, this function will throw an error.

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: NumberConfigOptions

        An options bag to constrain legal values.

      Returns OutputInstance<number> | undefined

    • getSecretObject loads an optional configuration value, as an object, by its key, marking it as a secret or undefined if it doesn't exist. This routine simply JSON parses and doesn't validate the shape of the contents.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to lookup.

      Returns Output<T> | undefined

    • require loads a configuration value by its given key. If it doesn't exist, an error is thrown.

      Type Parameters

      • K extends string = string

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: StringConfigOptions<K>

        An options bag to constrain legal values.

      Returns K

    • requireBoolean loads a configuration value, as a boolean, by its given key. If it doesn't exist, or the configuration value is not a legal boolean, an error is thrown.

      Parameters

      • key: string

        The key to lookup.

      Returns boolean

    • requireNumber loads a configuration value, as a number, by its given key. If it doesn't exist, or the configuration value is not a legal number, an error is thrown.

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: NumberConfigOptions

        An options bag to constrain legal values.

      Returns number

    • requireObject loads a configuration value as a JSON string and deserializes the JSON into a JavaScript object. If it doesn't exist, or the configuration value is not a legal JSON string, an error is thrown.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to lookup.

      Returns T

    • require loads a configuration value by its given key, marking it as a secret. If it doesn't exist, an error is thrown.

      Type Parameters

      • K extends string = string

      Parameters

      • key: string

        The key to lookup.

      • Optionalopts: StringConfigOptions<K>

        An options bag to constrain legal values.

      Returns Output<K>

    • requireSecretBoolean loads a configuration value, as a boolean, by its given key, marking it as a secret. If it doesn't exist, or the configuration value is not a legal boolean, an error is thrown.

      Parameters

      • key: string

        The key to lookup.

      Returns OutputInstance<boolean>

    • requireSecretObject loads a configuration value as a JSON string and deserializes the JSON into a JavaScript object, marking it as a secret. If it doesn't exist, or the configuration value is not a legal JSON string, an error is thrown.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to lookup.

      Returns Output<T>