github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/indent.html.md (about)

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