05/27/2021, 9:51 AM
A bit of a random question simply because it might be answer quicker than I figure it out - when doing this:
const aksIngresssManagedIdentity = await azure.managedidentity.getUserAssignedIdentity({...stuff...})
What happens when the identity I'm trying to get does not exist? Basically I'm trying to simplify some rules, and I'd like to conditionally link the ingress managed identity with AKS if and only if it exists (obviously). But I'm unsure of what the result of aksIngressManagedIdentity would be when it cannot find the identity that i'm looking for - so not sure what conditional I could use when it fails the lookup. edit: or would this be a good case for a try { } catch { } type thing?