sparse-intern-71089
06/01/2022, 3:06 PMwitty-candle-66007
06/01/2022, 5:34 PM.apply
or .all
to resolve those values to build the string as per: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#allfamous-needle-81667
06/01/2022, 9:44 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 engineNo 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