This message was deleted.
# golang
s
This message was deleted.
h
I suppose that’s normal behavior for `fmt.Printf`: https://goplay.space/#ncEmglC2dUI
I suppose I could write an
ApplyT
func that converts it to a string from a string pointer
Just following up, but that’s what I went with:
Copy code
// UnwrapString converts a StringPtrOutput to a StringOutput.
//
// If the string is `nil`, an empty string will be returned.
func UnwrapString(sp pulumi.StringPtrOutput) pulumi.StringOutput {
	return sp.ApplyT(func(v *string) string {
		if v == nil {
			return ""
		}
		return *v
	}).(pulumi.StringOutput)
}
Copy code
pulumi.Sprintf("serviceAccount:%s.svc.id.goog[%v/%v]", config.Require(ctx, "gcp:project"), UnwrapString(namespace.Metadata.Name()), UnwrapString(ksa.Metadata.Name()))
TIL you can just call
.Elem()
!