1. Packages
  2. Standard Library
  3. API Docs
  4. coalesce
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

    Returns the first non-nil or non-empty value from the given arguments. All arguments must be of the same type, or convertible to a common type.

    Using coalesce

    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 coalesce(args: CoalesceArgs, opts?: InvokeOptions): Promise<CoalesceResult>
    function coalesceOutput(args: CoalesceOutputArgs, opts?: InvokeOptions): Output<CoalesceResult>
    def coalesce(input: Optional[Sequence[Any]] = None,
                 opts: Optional[InvokeOptions] = None) -> CoalesceResult
    def coalesce_output(input: Optional[pulumi.Input[Sequence[Any]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[CoalesceResult]
    func Coalesce(ctx *Context, args *CoalesceArgs, opts ...InvokeOption) (*CoalesceResult, error)
    func CoalesceOutput(ctx *Context, args *CoalesceOutputArgs, opts ...InvokeOption) CoalesceResultOutput

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

    public static class Coalesce 
    {
        public static Task<CoalesceResult> InvokeAsync(CoalesceArgs args, InvokeOptions? opts = null)
        public static Output<CoalesceResult> Invoke(CoalesceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<CoalesceResult> coalesce(CoalesceArgs args, InvokeOptions options)
    public static Output<CoalesceResult> coalesce(CoalesceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:coalesce
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Input List<object>
    Input []interface{}
    input List<Object>
    input any[]
    input Sequence[Any]
    input List<Any>

    coalesce 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