Hi everybody, I would like to use Pulumi for backup. I want Pulumi to scan the current infrastructur...
b
Hi everybody, I would like to use Pulumi for backup. I want Pulumi to scan the current infrastructure, look for specific resource types, and create a snapshot/representation of what is in there. For example I want to backup our LLM deployments in Azure. Is this possible just with Pulumi? Or should I combine Azure API calls to fetch all existing deployments, and then call Pulumi with the resource IDs of those deployments? What next? I would like Pulumi to automatically create a representation of those resources in a file, say in the YAML format. Command line or Python code is preferrable. Thanks for any tips.
e
Sounds like you might want insights: https://www.pulumi.com/product/pulumi-insights/
b
That might be an option, thank you, I will look into it. If I wanted to implement it with Pulumi IaC and its automation API, where would you recommend I start?
e
There's nothing in the open source product to do the scanning, that might change in the future but currently you'd have to write that code against the azure api yourself but then you could use
pulumi import
to import the resources and get yaml code generated for them.
d
@big-teacher-56012 There are some docs that may help you get started: • Automation API: https://www.pulumi.com/docs/iac/automation-api/ • Tutorials: https://www.pulumi.com/tutorials/ I suspect that the ones most interesting to you are "Embedding Pulumi" and "Inspecting Infrastructure" Do you already have a Pulumi account?
h
Forgive the non-Pulumi response... but are you sure Pulumi is what you want here? What is your goal? If "backup" is what you want (as stated), wouldn't something like Velero be more appropriate? (again, depends on what your actual goal is...)