pulumi / examples

Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
https://www.pulumi.com
Apache License 2.0
2.39k stars 879 forks source link

aws-ts-oidc-provider-pulumi-cloud fails if there's no OIDC provider present #1713

Open jkodroff opened 4 weeks ago

jkodroff commented 4 weeks ago

What happened?

If there's no OIDC provider, aws.iam.getOpenIdConnectProviderOutput throws an exception. We probably need to put this into a try/catch or use the Command provider to check for the existence of an existing provider as there's no function to check for OIDC providers that returns a list.

Example

n/a - see above

Output of pulumi about

n/a - This isn't related to any particular provider version.

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).

jkodroff commented 2 weeks ago

Quick note that I'm looking at this today, and I don't know if the try/catch approach will work. We may need to pivot to 2 separate programs:

  1. Set up OIDC if you know it's not set up
  2. Add your Pulumi org to an existing OIDC provider