Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hclwrite: Generate multi-line objects and maps #372

Merged
merged 1 commit into from
May 6, 2020

Commits on May 6, 2020

  1. hclwrite: Generate multi-line objects and maps

    The previous syntax for object and map values was a single line of
    key-value pairs. For example:
    
      object = { bar = 5, baz = true, foo = "foo" }
    
    This is very compact, but in practice for many HCL values, less readable
    and less common than a multi-line object format. This commit changes the
    generated output from hclwrite to one line per attribute.
    
    Examples of the new format:
    
      // Empty object/map is a single line
      a = {}
    
      // Single-value object/map has the attribute on a separate line
      b = {
        bar = 5
      }
    
      // Multi-value object/map has one line per attribute
      c = {
        bar = 5
        baz = true
      }
    alisdair committed May 6, 2020
    Configuration menu
    Copy the full SHA
    926e53e View commit details
    Browse the repository at this point in the history