Added option for disabling MSI autodiscover feature in azure_keyvault_secret lookup plugin #1353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Added an option to be able to disable MSI autodiscover feature.
The default for the module is to assume that the MSI metadata URL is available, which slows down the module considerably when not being able to access that IP.
This way the original intended functionality is preserved and we who want to use it without MSI available can do so without an almost 30s penalty.
Some things had to be moved around due to where the options kwarg is available.
ISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_keyvault_secret
ADDITIONAL INFORMATION
Below follows a paste from running with and without MSI autodiscover enabled
With MSI autodiscovery without MSI metadata host:
Without MSI autodiscovery enabled:
And some examples that were in the previous pull request
Using MSI autodiscovery
Without MSI autodiscovery