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

    Adds a given number of spaces after each newline character in the given string.

    Using indent

    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 indent(args: IndentArgs, opts?: InvokeOptions): Promise<IndentResult>
    function indentOutput(args: IndentOutputArgs, opts?: InvokeOptions): Output<IndentResult>
    def indent(input: Optional[str] = None,
               spaces: Optional[int] = None,
               opts: Optional[InvokeOptions] = None) -> IndentResult
    def indent_output(input: Optional[pulumi.Input[str]] = None,
               spaces: Optional[pulumi.Input[int]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[IndentResult]
    func Indent(ctx *Context, args *IndentArgs, opts ...InvokeOption) (*IndentResult, error)
    func IndentOutput(ctx *Context, args *IndentOutputArgs, opts ...InvokeOption) IndentResultOutput

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

    public static class Indent 
    {
        public static Task<IndentResult> InvokeAsync(IndentArgs args, InvokeOptions? opts = null)
        public static Output<IndentResult> Invoke(IndentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<IndentResult> indent(IndentArgs args, InvokeOptions options)
    public static Output<IndentResult> indent(IndentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:indent
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Input string
    Spaces int
    Input string
    Spaces int
    input String
    spaces Integer
    input string
    spaces number
    input str
    spaces int
    input String
    spaces Number

    indent Result

    The following output properties are available:

    Result string
    Result string
    result String
    result string
    result str
    result String

    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