Cloudwatch: Fix loading custom credentials profile (#27684)

* Store credentials profile in JSON

* Update docs example

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Sofia Papagiannaki
2020-09-24 19:21:17 +03:00
committed by GitHub
co-authored by Arve Knudsen
parent f0a586a914
commit 42476811a4
5 changed files with 16 additions and 5 deletions
+6 -1
View File
@@ -294,9 +294,14 @@ func (e *cloudWatchExecutor) getDSInfo(region string) *datasourceInfo {
accessKey := decrypted["accessKey"]
secretKey := decrypted["secretKey"]
profile := e.DataSource.JsonData.Get("profile").MustString()
if profile == "" {
profile = e.DataSource.Database // legacy support
}
return &datasourceInfo{
Region: region,
Profile: e.DataSource.Database,
Profile: profile,
AuthType: authType,
AssumeRoleArn: assumeRoleArn,
ExternalID: externalID,