Has anyone implemented something similar to terra...
# golang
f
Has anyone implemented something similar to terraform templates?. I am trying to mimic the
"template_file" "userdata" {}
resource on Pulumi , specifically to use an
userdata.sh
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:
Copy code
data "template_file" "userdata" {
 template = file("${path.module}/userdata.sh")
 vars = {
     env  = "dev"
}
And then on my
userdata.sh
file just reference the variable:
Copy code
#!/bin/bash -xe

MYENV=${env}
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.