Skip to content

Issue handling heredoc with delimiter within text itself #190

Closed

Description

@j2cagle

Example:

locals { issue_3 = <<EOT FAKE_EOT_HERE EOT }

Example Error:
Unexpected token Token('NAME', 'EOT') at line 28, column 1.
Expected one of:
* LBRACE

Found a workaround:
locals { issue_3 = <<XYXYXYXY FAKE_EOT_HERE XYXYXYXY }

Activity

  1. changed the title [-]Issue handline heredoc with delimiter within text itself[/-] [+]Issue handling heredoc with delimiter within text itself[/+] on Feb 8, 2025
  2. kkozik-amplify commented on Feb 13, 2025

    @kkozik-amplify
    Collaborator

    Hey. Please provide clear, as-is example and workaround

  3. j2cagle commented on Feb 13, 2025

    @j2cagle
    Author

    Sorry, the formatting must have gotten messed up in my initial post:

    Example:

    locals {
    issue_3 = <<EOT
    FAKE_EOT_HERE
    EOT
    }

    Example Error:
    Unexpected token Token('NAME', 'EOT') at line 28, column 1.
    Expected one of:

    • LBRACE

    Found a workaround (change delimiter to something not in the text):
    locals {
    issue_3 = <<XYXYXYXY
    FAKE_EOT_HERE
    XYXYXYXY
    }

  4. added
    bug
    on Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions