https://pulumi.com logo
#getting-started
Title
# getting-started
s

silly-scientist-20604

06/08/2022, 8:36 AM
How do I get the Pulumi stack name (in Python) so I can use it in resource names? I have seen reference to something like
pulumi.getStack()
, but I cannot figure out how to invoke it in python:
Copy code
import pulumi
pulumi_stack_name = pulumi.getStack()
print( "pulumi_stack_name: ", pulumi_stack_name )
results in:
Copy code
AttributeError: module 'pulumi' has no attribute 'getStack'
q

quaint-eye-38036

06/08/2022, 9:44 AM
It's
pulumi.get_stack()
6 Views