Azure: Load custom clouds from ini file (#87667)

* Load custom clouds from config file

* Update docs

* Use the correct list of clouds, add test, fix error condition handling

* Remove on custom cloud from sample.ini and docs

* Remove unnecessary else block

* Use cached json instead of serializing with each request

* Update grafana-azure-sdk-go version to v2.0.4

* update configure-grafana entry for clouds_config

* fix lint errors

* fix lint errors

---------

Co-authored-by: Jeremy Angel (from Dev Box) <jeremyangel@microsoft.com>
This commit is contained in:
Jon Cole
2024-05-24 17:40:04 +01:00
committed by GitHub
co-authored by Jeremy Angel
parent 9f23e9a53b
commit 67b90ceba5
9 changed files with 88 additions and 3 deletions
@@ -95,6 +95,10 @@ func (s *RequestConfigProvider) PluginRequestConfig(ctx context.Context, pluginI
m[azsettings.AzureCloud] = azureSettings.Cloud
}
if len(azureSettings.CustomCloudListJSON) > 0 {
m[azsettings.AzureCustomCloudsConfig] = azureSettings.CustomCloudListJSON
}
if azureSettings.ManagedIdentityEnabled {
m[azsettings.ManagedIdentityEnabled] = "true"