sparse-intern-71089
06/01/2022, 2:57 PMfull-artist-27215
06/01/2022, 3:45 PMpulumi.Output.all(...)
call, passing all your variables in, and call .apply(...)
with a function that takes those variables and your templating solution of choice and spits out the final rendered output.famous-needle-81667
06/01/2022, 9:42 PMuserDataTpl, err := template.New("bash_script.tpl.sh").
ParseFiles("./templates/bash_script.tpl.sh")
if err != nil {
return err
}
userData := internalLoadBalancer.DnsName.ApplyT(
func(lbDNSName string) (*string, error) {
buf := new(bytes.Buffer)
err := userDataFrontendTpl.Execute(buf, map[string]string{"internal_lb_dns_name": lbDNSName})
userData := base64.StdEncoding.EncodeToString(buf.Bytes())
return &userData, err
},
).(pulumi.StringPtrOutput)
worked like a charm with native go templating enginefull-artist-27215
06/01/2022, 9:44 PMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by