resource "transloadit_template" "resize-img" {
name = "resize-img"
template = <<EOT
{
"steps": {
"imported": {
"robot": "/s3/import",
"credentials": "my_s3_$${assembly.region}",
"path": "/onthefly/$${fields.input}"
},
"resized": {
"use": "imported",
"robot": "/image/resize",
"width": "$${fields.w}",
"imagemagick_stack": "v2.0.7"
},
"served": {
"use": "resized",
"robot": "/file/serve"
}
}
}
EOT
}
I wonder if it would be possible somehow, to use HCL to write Templates instead, since it can map back to JSON?
Or maybe there is some native way where we can tell Terraform: hey this hcl right here can be turned into a JSON string right there?
Main reason: DX. Examples and config files are going to look prettier, you can comment Templates, no longer have trailing comma issues, nicer syntax highlighting.