big-account-56668
10/05/2020, 11:22 AMp := organizations.NewProject(ctx, "p", &organizations.ProjectArgs{
ProjectId: pulumi.Sprintf("%s-%s", petName.ID(), ctx.Stack()),
})
sa, err := compute.GetDefaultServiceAccount(ctx, &compute.GetDefaultServiceAccountArgs{
Project: &p.Name, // Project is a *string
})
but this clearly yields type error cannot use p.Name (variable of type pulumi.StringOutput) as *string value in struct literal
. Reading docs I've not been able to find the way to achieve this using either apply, lifting or interpolation.lemon-agent-27707
10/05/2020, 3:09 PMAll
and Apply
https://www.pulumi.com/docs/intro/concepts/programming-model/#apply
https://www.pulumi.com/docs/intro/concepts/programming-model/#allp.Name.Apply(func(n){
// do the GetDefaultServiceAcc call here
})
big-account-56668
10/06/2020, 9:18 AM