https://pulumi.com logo
#general
Title
# general
s

straight-father-31250

07/14/2023, 10:06 PM
is it possible to create a pulumi resource then later update it in the same stack?
s

salmon-account-74572

07/14/2023, 10:07 PM
Can you provide an example of what you’re thinking?
s

straight-father-31250

07/14/2023, 10:09 PM
an aws cognito UserPool, i need to set an html link in the welcome email it sends to users, but i can't construct that link without first creating a UserPoolClient and retrieving its id, but i can't create the UserPoolClient until I've created the UserPool...
s

salmon-account-74572

07/14/2023, 10:11 PM
I see. I’m not a Cognito expert, so apologies---does Cognito automatically send the welcome e-mail when the UserPool is created?
s

straight-father-31250

07/14/2023, 10:11 PM
no it sends the welcome email when you invite a user
but you have to set the email content on the userpool object
but i think for the purposes of this question maybe we can just ignore the cognito details -- imagine i want to create an object
A
and then an object
B
that depends on
A
, then set a property on
A
that is a string which includes
B.id
s

salmon-account-74572

07/14/2023, 10:13 PM
Ah, gotcha. I don’t think you’d be able to create the UserPool, then the UserPoolClient, and then set the e-mail content on the UserPool object. (Or, I don’t think you can create A, then create B, and then modify one of A’s properties with information from B.)
But, let me poke around a bit and see if I can find a workaround. It’s very nearly end of business for me, so it will be early next week before I can get back to you.
s

straight-father-31250

07/14/2023, 10:14 PM
appreciate the help
s

salmon-account-74572

07/14/2023, 10:15 PM
Happy to help!