09/21/2022, 3:58 AM
Has anyone implemented something similar to terraform templates?. I am trying to mimic the
"template_file" "userdata" {}
resource on Pulumi , specifically to use an
file that contains the user data for an EC2 instance, but inside this file I want to extrapolate some variables from my program. In Terrafrom one could do:
data "template_file" "userdata" {
 template = file("${path.module}/")
 vars = {
     env  = "dev"
And then on my
file just reference the variable:
#!/bin/bash -xe

Something similar exist on Pulumi or do I have to make a go file to store the user data and do the replacement over there?
Seem this is not available in Pulumi so I went ahead and used the native way of dealing with external files in Go.