This repo provides full end to end examples and walk-throughs for the Pulumi Automation API. The Automation API is available for Go, Node.js, Python and C#.
Use Automation API with an inline Pulumi program. Inline programs are self contained in a single main.go and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo.
This example shows how to use Automation API with an existing traditional CLI-driven Pulumi program. We add an Automation API deployment program to our Fargate program that deploys a web service via a Fargate task behind a load balancer.
This example shows how to refactor your infrastructure to get the best of both worlds, a debuggable inline program that can still be driven by the Pulumi CLI for convenience (one-off deployments, inspecting the stack, retrieving outputs, etc). In this example we deploy an S3 static website. The automation/main.go is fully debuggable, including the shared deployment function. The stack can also be managed via the CLI program in cli/main.go.
This example shows how to use Automation API to tame the complexity of multiple stacks with dependent stack outputs. We decompose our S3 static website into two stacks, one that manages the bucket, and another that manages the index.html file. Both of these are defined as inline programs, and are deployed and destroyed together via a single main.go
This application demonstrates how to run Automation API in an HTTP server to expose infrastructure as RESTful resources. In our case, we've defined and exposed a static website site that exposes all of the CRUD operations plus list. Users can hit our REST endpoint and create custom static websites by specifying the content field in the POST body. All of our infrastructure is defined in inline programs that are constructed and altered on the fly based on input parsed from user-specified POST bodies.
This example provisions an AWS Aurora SQL database and executes a database "migration" using the resulting connection info. This migration creates a table, inserts a few rows of data, and reads the data back to verify the setup. This is all done in a single program using an inline Pulumi program. With Automation API you can orchestrate complex workflows that go beyond infrastructure provisioning and into application management, database setup, etc.
This example demonstrates how to use Automation API to run Pulumi programs remotely with Pulumi Deployments. In this case a static S3 website from the Pulumi examples repo.
Use Automation API with an inline Pulumi program. Inline programs are self-contained in a single index.ts and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo. This example uses typescript with ts-node as an execution environment.
Use Automation API with an inline Pulumi program. Inline programs are self-contained in a single index.ts and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo. This example uses typescript compiled into javascript via tsc and executed via node.
Use Automation API with an inline Pulumi program. Inline programs are self-contained in a single index.js and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo. This example uses plain javascript executed via node.
This example shows how to use Automation API with an existing traditional CLI-driven Pulumi program. We add an Automation API deployment program to our existing CLI-driven S3 website program. This example uses typescript with ts-node as an execution environment.
This example shows how to use Automation API in typescript with an existing traditional CLI-driven Pulumi program written in a different language, in this case go. We add an Automation API deployment program to our Fargate program that deploys a web service via a Fargate task behind a load balancer. This automation program uses typescript with ts-node as an execution environment.
This application demonstrates how to run Automation API in an HTTP server to expose infrastructure as RESTful resources. In our case, we've defined and exposed a static website site that exposes all of the CRUD operations plus list. Users can hit our REST endpoint and create custom static websites by specifying the content field in the POST body. All of our infrastructure is defined in inline programs that are constructed and altered on the fly based on input parsed from user specified POST bodies.
This example provisions an AWS Aurora SQL database and executes a database "migration" using the resulting connection info. This migration creates a table, inserts a few rows of data, and reads the data back to verify the setup. This is all done in a single program using an inline Pulumi program. With Automation API you can orchestrate complex workflows that go beyond infrastructure provisioning and into application management, database setup, etc.
This example shows how to use Automation API with an existing traditional CLI-driven Pulumi program alongside some mocha-based integration tests to ensure that the infrastructure was set up properly. This example uses typescript with ts-node as an execution environment, with mocha being used to run the tests.
This example demonstrates how to use Automation API to run Pulumi programs remotely with Pulumi Deployments. In this case a static S3 website from the Pulumi examples repo.
Use Automation API with an inline Pulumi program. Inline programs are self contained in a single main.py and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo.
This example shows how to use Automation API in python with an existing traditional CLI-driven Pulumi program written in a different language, in this case go. We add an Automation API deployment program to our Fargate program that deploys a web service via a Fargate task behind a load balancer.
This example provisions an AWS Aurora SQL database and executes a database "migration" using the resulting connection info. This migration creates a table, inserts a few rows of data, and reads the data back to verify the setup. This is all done in a single program using an inline Pulumi program. With Automation API you can orchestrate complex workflows that go beyond infrastructure provisioning and into application management, database setup, etc.
This example shows how to use Automation API with an existing traditional CLI-driven Pulumi program. We add an Automation API deployment program to our existing CLI-driven app described in the aws-py-voting-app example.
This application demonstrates how to run Automation API in an HTTP server to expose infrastructure as RESTful resources. In our case, we've defined and exposed a static website site that exposes all of the CRUD operations plus list. Users can hit our REST endpoint and create custom static websites by specifying the content field in the POST body. All of our infrastructure is defined in inline programs that are constructed and altered on the fly based on input parsed from user specified POST bodies.
This example demonstrates how to use Automation API to run Pulumi programs remotely with Pulumi Deployments. In this case a static S3 website from the Pulumi examples repo.
Use Automation API with an inline Pulumi program. Inline programs are self contained in a .NET console application and support full debugging capabilities. In this demo we deploy the same static S3 website adapted from the Pulumi examples repo.
This example shows how to use Automation API with an existing traditional CLI-driven Pulumi program. We add an Automation API deployment program to our existing CLI-driven S3 website program.
This example shows how to use Automation API in dotnet with an existing traditional CLI-driven Pulumi program written in a different language, in this case go. We add an Automation API deployment program to our Fargate program that deploys a web service via a Fargate task behind a load balancer.
This example provisions an AWS Aurora SQL database and executes a database "migration" using the resulting connection info. This migration creates a table, inserts a few rows of data, and reads the data back to verify the setup. This is all done in a single program using an inline Pulumi program. With Automation API you can orchestrate complex workflows that go beyond infrastructure provisioning and into application management, database setup, etc.
This example demonstrates how to use Automation API to run Pulumi programs remotely with Pulumi Deployments. In this case a static S3 website from the Pulumi examples repo.
Hello! I think all examples use a local state file... I I'm not sure, are remote state backends supported at all? It would be super useful to have an example π Thanks a lot, the automation API seems super interesting π
Is there auto-roll back option in pulumi? if xyz resource isn't found or created can we auto roll back all resources in stack?
can we convert pulimi.IDOutput to string and *string?
I am creating EC2 machine and right after that I am running ansible. But the problem is machine state gets to βrunningβ after some time and due to that ansible fails to reach the server. Is there await or anything in native pulumi as an option while creating EC2?
I know we can add our own custom loop and check state of the machine and then continue but I want to try pulumi option if available.
I noticed pulumi randomly starts executing code in deployfunc of automation api. Is there a way I can remove it and make it to execute code from top to bottom?
I know about dependson option, but it executes print statements before resource creation as well which I want to avoid and execute the code from top to bottom.
pulumi program is not downloading the correct provider plugin
Diagnostics:
pulumi:providers:aws (default_4_38_1):
error: no resource plugin 'aws-v4.38.1' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource aws v4.38.1`
Resources:
+ 1 created
Duration: 1s
Unhandled exception. Pulumi.Automation.Commands.Exceptions.CommandException: code: 255
database migration examples rely on AMI that no longer exists
database migration tests fail with similar errors to such.
Diagnostics:
pulumi:pulumi:Stack (database_migration-dev):
error: update failed
aws:rds:Cluster (db):
error: 1 error occurred:
* error creating RDS cluster: InvalidParameterCombination: Cannot find version 5.7.mysql_aurora.2.03.2 for aurora-mysql
status code: 400, request id: 295f4c4d-3b43-427f-a3dd-bd9ef30d7c6c
Resources:
+ 3 created
typescript invalid syntax on types
node database migration CI error. appears to be caused by having an old version of typescript.
yarn run v1.22.19
$ tsc && node ./bin/index.js
Error: node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts(1,13): error TS1005: '=' expected.
Error: node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts(1,83): error TS1005: ';' expected.
Error: node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts(2,13): error TS1005: '=' expected.
Error: node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts(2,40): error TS1005: ';' expected.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 2.
Steps to reproduce
run CI
Expected Behavior
CI passes
Actual Behavior
doesn't pass
Output of pulumi about
No response
Additional context
No response
Contributing
Vote on this issue by adding a π reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).