Asked this in python but I guess it's more of a ge...
# general
m
Asked this in python but I guess it's more of a general question. The documentation for the automation API are not super verbose for python but I did find this helpful resource for getting started (https://github.com/pulumi/automation-api-examples/). I was wondering if anybody could point me in the direction of examples of how to do simple things like import resources into a stack using the automation API
m
In my experience, the key is to understand that the Automation API is "just" a wrapper around the CLI (see the Python implementation). For the resource import, you can look at the implementation of Stack.import_resources() to see how the method's arguments map to the Pulumi CLI's parameters. Assuming you already know the CLI call you want to make, it should be relatively straightforward to map this to an Automation API call.