This message was deleted.
# general
s
This message was deleted.
b
Hi What language are you using?
Here is how I do with typescript:
Copy code
import * as fs from 'fs'
import * as _ from "lodash"

const TEMPLATE_SETTINGS = {
    interpolate: /{{([\s\S]+?)}}/g, // Mustache template delimiter: `{{variable}}`
    evaluate: undefined, 
    escape: undefined, 
}

const value = _.template(fs.readFileSync('./assets/file.yaml', 'utf8'), TEMPLATE_SETTINGS)({
                var1: 'value1',                     
                var2: 'value2',
            })
see doc of lodash interpolate for more details
as there is no pulumi way today (I guess), we have to use language capabilities
and it could be great to have these workarounds in doc 😉
note that I use mustache delimiter to prevent conflict with bash variable (
$VAR
)
t
thank you for helping 🙂
I am ysing type script 🙂