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

Support HEREDOCs in lists #66

Merged
merged 1 commit into from
Nov 29, 2015
Merged

Support HEREDOCs in lists #66

merged 1 commit into from
Nov 29, 2015

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Nov 26, 2015

This fixes a regression in Terraform where HEREDOCS were previously supported in lists, reported in hashicorp/terraform#4065.

This fixes a regression in Terraform where HEREDOCS were previously
supported in lists, reported in hashicorp/terraform#4065.
@jen20 jen20 added the bug label Nov 26, 2015
@sethvargo
Copy link
Contributor

👍

jen20 added a commit that referenced this pull request Nov 29, 2015
@jen20 jen20 merged commit 8a65681 into master Nov 29, 2015
@jen20 jen20 deleted the b-heredoc-lists branch November 29, 2015 11:28
apparentlymart added a commit that referenced this pull request Sep 9, 2019
This allows using a splat expression to conveniently coerce a
possibly-null scalar into a zero- or one-item tuple, which is helpful
because in HCL we prefer "for each item in sequence" operations over pure
conditionals in many situations just because they compose better in our
declarative language.

For example, in a language that uses the "dynblock" extension we can
turn a possibly-null object into zero or one blocks using its for_each
argument with a splat operation:

    dynamic "thingy" {
      for_each = maybe_null.*
      content {
        name = thingy.value.name
      }
    }

This fixes #66.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants