From 6c375ed2cb605b6af9246a7f826d4ccf78619750 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 27 Sep 2017 00:18:05 +0900 Subject: [PATCH] fix assume role --- pkg/tsdb/cloudwatch/credentials.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tsdb/cloudwatch/credentials.go b/pkg/tsdb/cloudwatch/credentials.go index 81e0262a3d4..784f3b729ac 100644 --- a/pkg/tsdb/cloudwatch/credentials.go +++ b/pkg/tsdb/cloudwatch/credentials.go @@ -141,6 +141,7 @@ func ec2RoleProvider(sess *session.Session) credentials.Provider { } func (e *CloudWatchExecutor) getDsInfo(region string) *DatasourceInfo { + authType := e.DataSource.JsonData.Get("authType").MustString() assumeRoleArn := e.DataSource.JsonData.Get("assumeRoleArn").MustString() accessKey := "" secretKey := "" @@ -156,6 +157,7 @@ func (e *CloudWatchExecutor) getDsInfo(region string) *DatasourceInfo { datasourceInfo := &DatasourceInfo{ Region: region, Profile: e.DataSource.Database, + AuthType: authType, AssumeRoleArn: assumeRoleArn, AccessKey: accessKey, SecretKey: secretKey,