10/06/2021, 8:35 AM
quick question - in my pulumi code, is it possible to fetch some kind of a current-stack’s unique ID? I just need to ensure uniqueness when defining my cognito user pool domain, and I think that might help me in achieving that 🙂


10/06/2021, 8:44 AM
I don’t know anything about some unique ID (like uuid or something) but I guess you can reuse stack name to achieve your goal. Stack name must be unique within your organization for the given project so the combination of:
must be globally unique within Pulumi Service.


10/06/2021, 8:45 AM
You can get these values:
Copy code
PROJECT = pulumi.get_project()
STACK = pulumi.get_stack()
Then it's about the naming convention of your stacks. eg:
which you can simply parse in separate items


10/06/2021, 8:51 AM
thanks for the help guys, this helped
although a super simple idea came to my mind……. cognito user pool domain relies on user pool.. so I’ll just use its unique ID in the user pool domain name and that’s it 🙂
thanks again for your time guys! 🍻