[azure][lfo] Auto-register missing resource providers#63
Conversation
|
This can be a separate PR, but could we perform this validation while or after fetching existing LFOs in the quickstart script? Anything we can do before they make their selections is saving them time and improving their experience. |
I thought about this - the problem is that resource providers need to be registered per subscription. So we need to check these once the scope selections are locked in. But can be done. |
OK makes sense, we probably don't want to register the providers for all the subscriptions and that could take a long time anyway. |
Overview
AZINTS-4108
Current State
The LFO script validates that the necessary resource providers are already registered prior to setting up LFO resources. If one of the resource providers is unavailable, the script throws an error telling the user to register those resource providers and re-execute the script.
New State
The LFO script will collect the missing resource providers per subscription that the user configured for LFO and spin up threads in parallel to register the resource providers. Assuming that these registrations succeed, the script will proceed as usual.
I had previously written this feature using the async resource provider registration API, but the API to check the registration status was not very dependable. I realized there is a
--waitflag that we can use on the registration command, so spinning up threads in our script with that proved to be better.Testing
Manual happy path tests looking good - I am trying out some edge cases now.