1. Packages
  2. Standard Library
  3. API Docs
  4. lookup
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
std logo
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi

    Performs a dynamic lookup into a map variable.

    Using lookup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function lookup(args: LookupArgs, opts?: InvokeOptions): Promise<LookupResult>
    function lookupOutput(args: LookupOutputArgs, opts?: InvokeOptions): Output<LookupResult>
    def lookup(default: Optional[Any] = None,
               key: Optional[str] = None,
               map: Optional[Mapping[str, Any]] = None,
               opts: Optional[InvokeOptions] = None) -> LookupResult
    def lookup_output(default: Optional[Any] = None,
               key: Optional[pulumi.Input[str]] = None,
               map: Optional[pulumi.Input[Mapping[str, Any]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[LookupResult]
    func Lookup(ctx *Context, args *LookupArgs, opts ...InvokeOption) (*LookupResult, error)
    func LookupOutput(ctx *Context, args *LookupOutputArgs, opts ...InvokeOption) LookupResultOutput

    > Note: This function is named Lookup in the Go SDK.

    public static class Lookup 
    {
        public static Task<LookupResult> InvokeAsync(LookupArgs args, InvokeOptions? opts = null)
        public static Output<LookupResult> Invoke(LookupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<LookupResult> lookup(LookupArgs args, InvokeOptions options)
    public static Output<LookupResult> lookup(LookupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:lookup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Key string
    Map Dictionary<string, object>
    Default object
    Key string
    Map map[string]interface{}
    Default interface{}
    key String
    map Map<String,Object>
    default_ Object
    key string
    map {[key: string]: any}
    default any
    key str
    map Mapping[str, Any]
    default Any
    key String
    map Map<Any>
    default Any

    lookup Result

    The following output properties are available:

    Result object
    Result interface{}
    result Object
    result any
    result Any
    result Any

    Package Details

    Repository
    std pulumi/pulumi-std
    License
    std logo
    StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate