mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -72,6 +72,12 @@ func (cfg *Cfg) readAzureSettings() {
|
||||
azureSettings.UserIdentityFallbackCredentialsEnabled = azureSection.Key("user_identity_fallback_credentials_enabled").MustBool(true)
|
||||
}
|
||||
|
||||
if customCloudsJSON := azureSection.Key("clouds_config").MustString(""); customCloudsJSON != "" {
|
||||
if err := azureSettings.SetCustomClouds(customCloudsJSON); err != nil {
|
||||
cfg.Logger.Error("Failed to parse custom Azure cloud settings", "err", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
azureSettings.ForwardSettingsPlugins = util.SplitString(azureSection.Key("forward_settings_to_plugins").String())
|
||||
|
||||
cfg.Azure = azureSettings
|
||||
|
||||
Reference in New Issue
Block a user