Config: making [aws][external_id] part of env (#72062)
* Config: making [aws][external_id] part of env * Fix go.sum * Add a test
This commit is contained in:
@@ -289,6 +289,7 @@ type Cfg struct {
|
||||
AWSAllowedAuthProviders []string
|
||||
AWSAssumeRoleEnabled bool
|
||||
AWSListMetricsPageLimit int
|
||||
AWSExternalId string
|
||||
|
||||
// Azure Cloud settings
|
||||
Azure *azsettings.AzureSettings
|
||||
@@ -1300,6 +1301,11 @@ func (cfg *Cfg) handleAWSConfig() {
|
||||
if err != nil {
|
||||
cfg.Logger.Error(fmt.Sprintf("could not set environment variable '%s'", awsds.AllowedAuthProvidersEnvVarKeyName), err)
|
||||
}
|
||||
|
||||
cfg.AWSExternalId = awsPluginSec.Key("external_id").Value()
|
||||
if err != nil {
|
||||
cfg.Logger.Error(fmt.Sprintf("could not set environment variable '%s'", awsds.GrafanaAssumeRoleExternalIdKeyName), err)
|
||||
}
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readSessionConfig() {
|
||||
|
||||
Reference in New Issue
Block a user