https://pulumi.com logo
#python
Title
# python
v

victorious-exabyte-70545

03/01/2022, 10:40 PM
Is it possible to stack exports and imports with the pulumi SDK?
m

miniature-musician-31262

03/02/2022, 1:48 AM
Iā€™m not sure I understand. Could you elaborate?
v

victorious-exabyte-70545

03/02/2022, 3:24 PM
Copy code
pulumi stack export
Copy code
pulumi stack import
can this be done with the pulumi sdk in python.
g

great-queen-39697

03/02/2022, 3:58 PM
You can export specific values with stack exports:
Copy code
pulumi.export(name: str, value: Any)
If you're looking to actually dump the stack's details as you would from the CLI, then that's the Automation API with pulumi.automation.LocalWorkspace.export_stack and pulumi.automation.LocalWorkspace.import_stack
ā˜ļø 1
v

victorious-exabyte-70545

03/02/2022, 6:12 PM
@great-queen-39697 Thank you!!!
šŸ™‡ā€ā™€ļø 1
Really, I just want to automate the cleaning of pending (failed resource creation). Not sure if there is a better way?
g

great-queen-39697

03/02/2022, 6:27 PM
Ah, we were just talking about this in #automation-api. Here's a link to the thread: https://pulumi-community.slack.com/archives/C019YSXN04B/p1646144559200289
There's some solutions in there, but the issue linked in that conversation is the one you should go vote on. We use the GitHub thumbs-up votes as part of our roadmap to know what we need to work on the most
v

victorious-exabyte-70545

03/02/2022, 6:45 PM
Thanks!
šŸ‘ 1
20 Views