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
Allow creating template strings without having to create the file
Use Case
For example, if you use a data source with templated variables like the data source aws_iam_policy_document, you could previously feed in its json text into the template_file data source and allow replacements. With templatefile, you can no longer do this easily.
Describe Ideal Solution
Ideal solution would be to implement a templatestring() but custom providers cannot add new functions.
So the ideal solution would be to recreate the original data source template_file.
Alternatives Considered
Manually create a template file containing the iam policy document, add in the appropriate variables, then use templatefile to replace them.
Use multiple replace functions which is pretty hacky and could cause issues (example)
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
The
templatefile
function cannot use a string. It has to use a file that has been created prior to theterraform
commands.Feature would be similar to the archived
template_file
data sourceUnfortunately hashicorp/terraform-provider-template has been archived before darwin osx supported binary was released.
This maybe... would be a stop gap solution until PR hashicorp/terraform#28700 is implemented.
Expected Behavior
Allow creating template strings without having to create the file
Use Case
For example, if you use a data source with templated variables like the data source
aws_iam_policy_document
, you could previously feed in its json text into thetemplate_file
data source and allow replacements. Withtemplatefile
, you can no longer do this easily.Describe Ideal Solution
Ideal solution would be to implement a
templatestring()
but custom providers cannot add new functions.So the ideal solution would be to recreate the original data source
template_file
.Alternatives Considered
templatefile
to replace them.Additional Context
The text was updated successfully, but these errors were encountered: