Is there any tutorial, from Pulumi or someone else...
# automation-api
Is there any tutorial, from Pulumi or someone else, which describes the pros and cons of using Pulumi Automation API?
The automation API wraps the Pulumi CLI, so the underlying behavior is more or less the same. What you get though, is cleaner integration with your existing application's language and testability that might be more difficult to achieve if you were writing your own wrapper. As well as the ecosystem that's built on top of this / existing examples to learn from.
Hi catmeme, thanks for your answer. I do realize in broad terms what the Automation API provides of value - it could be I'm having issues grasping pros/cons since Pulumi is my first introductio to IaC - however, I wish there were more tutorials targeting less experienced developers on WHY certain things are done, and why Automation API should be a consideration compared to Pulumi CLI
@dry-sugar-28823 the Automation API allows you to embed Pulumi's power into bigger automations. Here is something I build for a company (before I joined Pulumi): the company had a medical imaging product. They wanted to bring this online, but it wasn't multi-tenant. So for each customer they had to spin up some infrastructure. I worked with an integrator of their ERP system, which adapted the sales flow in the ERP system. When a customer bought their product, at a certain step in the flow, the ERP system called my custom REST API with customer details, license type (SKU), etc. My custom REST server used a workflow engine which rolled out the infrastructure in a number of steps. I spare you the complexity, but I had workflow steps in code, where I used the Automation API to integrate the workflow engine with Pulumi. At every step in this setup, I had code I could (unit) test rather than shell scripts. For the business, this spared the OPS team from a ticket system with requests to set up customer tenants. Small example of the workflow engine linked above with Pulumi Automation API:
@millions-furniture-75402 Yes I've read all the articles, still did not see a why in any of the examples. @limited-rainbow-51650 thanks for your example, this to me makes perfect sense and has given me a much better insight to what is achievable, and why you have chosen to use Automation API 🙂