-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcl2: Use the actual string snippet as it appears from undefined
With the updated undefined variable code, we attempt to pick the text of `${....}` verbatim from the hcl body. Previously, we'd attempt to regenerate the string from the AST and pray it matches input; the generation is lossy, as the same AST can represent multiple variations (e.g. `${v.0}` and `${v[0]}` have the same HCLv2 AST). In this change, we attempt to go back to the hcl2 source and find the string snippet corresponding to the variable reference.
- Loading branch information
Mahmood Ali
committed
Apr 7, 2021
1 parent
e488493
commit f4b62ea
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters