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

     1  ---
     2  layout: "language"
     3  page_title: "compact - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-collection-compact"
     5  description: |-
     6    The compact function removes empty string elements from a list.
     7  ---
     8  
     9  # `compact` Function
    10  
    11  `compact` takes a list of strings and returns a new list with any empty string
    12  elements removed.
    13  
    14  ## Examples
    15  
    16  ```
    17  > compact(["a", "", "b", "c"])
    18  [
    19    "a",
    20    "b",
    21    "c",
    22  ]
    23  ```