AWS OIDC provider for Pulumi Cloud
AWS OIDC setup for Pulumi ESC
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set aws-ts-oidc-provider-pulumi-cloudcd pulumi-examples/aws-ts-oidc-provider-pulumi-cloudA Pulumi program that configures AWS OIDC for use with Pulumi ESC. It:
- Creates AWS resources for AWS OIDC (IdP + Role)
- Creates a new Pulumi Cloud ESC Environment
Prerequisites#
Deploying the example#
This example is also published as a template that you can copy with pulumi new:
pulumi loginpulumi new https://github.com/pulumi/examples/aws-ts-oidc-provider-pulumi-cloud --dir my-aws-oidccd my-aws-oidcOnce copied to your machine, feel free to edit as needed.
-
Create a new stack, which is an isolated deployment target for this example:
Terminal window pulumi stack init dev -
Set the AWS region and the ESC project and environment names to generate:
Terminal window pulumi config set aws:region us-west-2pulumi config set escProject awspulumi config set escEnvironmentName aws-oidc-admin -
Install dependencies:
Terminal window npm install -
Deploy the stack. This template will pick up the thumbprint from the URL that you set in the stack configuration. By default it will use the OIDC IDP URL for Pulumi Cloud.
Terminal window pulumi up
Cleaning up#
To clean up your infrastructure, run:
pulumi destroypulumi stack rm