We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I try to add files via the fileContents.
My current template is the following:
template { destination = "config/[[var "RETAILER_ID" .]].[[var "SYSTEM_ID" .]]/[[$settings.FILTER_CONFIG_FILE]]" data = <<EOT [[ fileContents "../config-files/[[var "RETAILER_ID" .]].[[var "SYSTEM_ID" .]]/[[$settings.FILTER_CONFIG_FILE]]" ]] EOT }
And I get the following error: Error: template: <file>:25: bad character U+0022 '"'
Error: template: <file>:25: bad character U+0022 '"'
How can I add variables to the data block (with the new Syntax)?
The text was updated successfully, but these errors were encountered:
I have found a hacky solution:
template { destination = "config/[[var "RETAILER_ID" .]].[[var "SYSTEM_ID" .]]/[[$settings.FILTER_CONFIG_FILE]]" data = <<EOT [[$A:="../config-files/"]] [[$B:=(var "RETAILER_ID" .)]] [[$C:="."]] [[$D:=(var "SYSTEM_ID" .)]] [[$E:="/"]] [[$F:=($settings.FILTER_CONFIG_FILE)]] [[$concat:=(print $A $B $C $D $E $F) ]] [[$concat | fileContents]] EOT } ``` If anyone has a not so hacky solution, it is still appreciated.
Sorry, something went wrong.
Still not sure what the best possibility is but i've another one:
[[$baseSourcePath := list "../config-files/" (var "RETAILER_ID" .) "." (var "SYSTEM_ID" .) | join "" ]] [[$baseTargetPath := list "config/" (var "RETAILER_ID" .) "." (var "SYSTEM_ID" .) | join "" ]] ... template { destination = "[[$baseTargetPath]]/[[$settings.FILTER_CONFIG_FILE]]" data = <<EOT [[ list ($baseSourcePath) "/generated_filter_configuration/" ($settings.FILTER_CONFIG_FILE) | join "" | fileContents ]] EOT }
No branches or pull requests
I try to add files via the fileContents.
My current template is the following:
And I get the following error:
Error: template: <file>:25: bad character U+0022 '"'
How can I add variables to the data block (with the new Syntax)?
The text was updated successfully, but these errors were encountered: