https://pulumi.com logo
Title
p

prehistoric-nail-50687

03/31/2021, 8:42 AM
The automation API also seems to support
importStack
, same as the CLI - does the automation API also generate the code for the imported resource, as the CLI does?
b

brave-planet-10645

03/31/2021, 8:49 AM
Importing of the stack (whether of the CLI -
pulumi stack import
or automation api) doesn't generate any code. Importing of individual resources (
pulumi import
) generates code.
p

prehistoric-nail-50687

03/31/2021, 8:53 AM
ah, damn thats what I’m looking for. -so this then seems not to be supported by the automation api I guess
The reason why I’m asking is because I just noticed that gcloud export now supports terraform as the export format:
gcloud alpha resource-config bulk-export  --resource-format=terraform
https://cloud.google.com/sdk/gcloud/reference/alpha/resource-config/bulk-export So I was wondering if I would be able to build something like that with pulumi
b

brave-planet-10645

03/31/2021, 8:59 AM
You can bulk import multiple resources by passing in a json file: https://www.pulumi.com/docs/reference/cli/pulumi_import/
Although I suspect to use that GCP exporter you'd want to export as terraform then use tf2pulumi to generate the Pulumi code
p

prehistoric-nail-50687

03/31/2021, 9:01 AM
yeah, but then it would be GCP specific - something more general would be great
b

brave-planet-10645

03/31/2021, 9:12 AM
I'm not understanding what it is you're looking for
p

prehistoric-nail-50687

03/31/2021, 9:33 AM
never mind, I’m just thinking if it would be worth to build a tool which would ease the export of multiple resources from a Cloud Provider (GCP, AWS, Azure, …) in a more simple way - e.g. visual selection of the resources to be exported
l

lemon-agent-27707

03/31/2021, 1:53 PM
cc @dazzling-scientist-80826 ^ Domi you might want to look at https://www.deref.io/
p

prehistoric-nail-50687

03/31/2021, 2:11 PM
cool, thanks!
d

dazzling-scientist-80826

04/02/2021, 4:21 PM
Thanks @lemon-agent-27707. @prehistoric-nail-50687 I've DM'd you. Hopefully we can help 🙂 If others are interested in this topic, feel free to DM me too.