examples icon indicating copy to clipboard operation
examples copied to clipboard

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

Open jkodroff opened this issue 1 year ago • 1 comments

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 avatar Oct 11 '24 16:10 jkodroff

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

jkodroff avatar Oct 21 '24 17:10 jkodroff

It's not possible to use a try/catch this way and conditionally create the OIDC provider. This would have to be a separate program to add a subject to an OIDC provider that already exists. Closing this issue as won't fix.

jkodroff avatar Apr 24 '25 22:04 jkodroff