This program demonstrates how to use Automation API to run Pulumi programs remotely with Pulumi Deployments on Pulumi service hardware (api.pulumi.com). This example deploys the aws-ts-s3-folder project from the Pulumi examples repo.
To run this example you'll need a few pre-reqs:
- A Pulumi CLI installation (v3.45.0 or later), logged in to the Pulumi service via
pulumi login
. - AWS environment variables for AWS credentials (
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
, andAWS_SESSION_TOKEN
). Learn more.
Running this program is just like any other .NET console application. You can run dotnet run
from the project directory, or you could run the resulting .exe
from the build directory in the bin
folder.
$ dotnet run <pulumi-username-or-organization>
This will kick-off the remote deployment using Pulumi Deployments.
To destroy the stack when you're done, invoke the program with an additional destroy
argument:
$ dotnet run <pulumi-username-or-organization> destroy