github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/indent.mdx (about)

     1  ---
     2  page_title: indent - Functions - Configuration Language
     3  description: |-
     4    The indent function adds a number of spaces to the beginnings of all but the
     5    first line of a given multi-line string.
     6  ---
     7  
     8  # `indent` Function
     9  
    10  `indent` adds a given number of spaces to the beginnings of all but the first
    11  line in a given multi-line string.
    12  
    13  ```hcl
    14  indent(num_spaces, string)
    15  ```
    16  
    17  ## Examples
    18  
    19  This function is useful for inserting a multi-line string into an
    20  already-indented context in another string:
    21  
    22  ```
    23  > "  items: ${indent(2, "[\n  foo,\n  bar,\n]\n")}"
    24    items: [
    25      foo,
    26      bar,
    27    ]
    28  ```
    29  
    30  The first line of the string is not indented so that, as above, it can be
    31  placed after an introduction sequence that has already begun the line.