You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugin is commenting out part of the code when it encounters the string - '/*'.
I'm using filters for data source amazon-ami to get an ubuntu image. Value for name key in the filter is "ubuntu/images/ubuntu-bionic-18.04-amd64-server-".
images/*ubuntu
Above part is the problematic one, as plugin assumes it is a comment. Following code is from Packer docs and valid. Tested using validate and build subcommands in Packer.
can confirm, have the same issue - HCL allows you to create a comment block with:
/* comment1comment2*/varabc = int0
The fix would be something like ignoring this pattern inside string quotes (single or double) but I have no idea how to make that the case in the grammar format used here. For now I am putting the data block for the amazon ami at the bottom of the config to limit the impact of the highlighting issue, or put the search string for the name in a variable and reference that instead.
put the search string for the name in a variable and reference that instead
Additionally... You have to use a variable (probably with a hardcoded default value) and not a local as datasources cannot currently reference locals in Packer (as of 1.7.3). Reference: hashicorp/packer#11011
Plugin is commenting out part of the code when it encounters the string - '/*'.
I'm using filters for data source amazon-ami to get an ubuntu image. Value for name key in the filter is "ubuntu/images/ubuntu-bionic-18.04-amd64-server-".
Above part is the problematic one, as plugin assumes it is a comment. Following code is from Packer docs and valid. Tested using validate and build subcommands in Packer.
Here's a screenshot of the code above code.
And without "/*" part
The text was updated successfully, but these errors were encountered: