https://pulumi.com logo
Title
g

great-sunset-355

02/20/2023, 2:42 PM
I need to check if
gcp.types.input.cloudrunv2.JobTemplateTemplateVolume.secret
is not undefined and based on that create IAMMember, however the input type is
pulumi.Input<pulumi.Input<gcp.types.input.cloudrunv2.JobTemplateTemplateVolume>[]>
. Is it possible to check if
secret === undefined
without using
apply
? If not I will have to create
IAMMember
in
apply
because this is a chicken egg problem
s

steep-toddler-94095

02/20/2023, 6:55 PM
It's not possible. While i think it's not recommended to create resources in applies, but i do it sometimes and haven't run into issues yet But is there another way you can check if the secret will be defined or not?
g

great-sunset-355

02/21/2023, 2:14 PM
In the end I wrote my own
interface
for this without
Inputs