Merge branch 'master' into backend_plugins
* master: (584 commits) prometheus: change default resolution to 1/1 fix: viewers can edit now works correctly fix: fixed minor ux and firefox issues, fixes #10228 ux: minor fixes profile: use name or fallback for profile page fix: sidemenu profile main text is now username instead of name build: update master version to 5.0.0-pre1 dashfolder: change to migration text ux:s sidemenu icon rules teams: add team count when searching for team changed background color for infobox and new blues in light theme, light theme now uses blue-dark in panel query (#10211) ux: fixed navbar issue when sidemenu closes ux: minor position change for layout selector, fixes #10217 fix: view json from share modal now works, #10217 ux: used new add data sources icon dashfolders: styling of selected filters dashfolders: styling of selected filters dashfolders: fix moving plugin dashboard to folder changelog: adds note about closing #9170 dashfolders: fix folder selection dropdown in dashboard settings ...
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
|
||||
"github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
|
||||
"github.com/aws/aws-sdk-go/aws/defaults"
|
||||
"github.com/aws/aws-sdk-go/aws/ec2metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatch"
|
||||
@@ -128,10 +129,10 @@ func remoteCredProvider(sess *session.Session) credentials.Provider {
|
||||
func ecsCredProvider(sess *session.Session, uri string) credentials.Provider {
|
||||
const host = `169.254.170.2`
|
||||
|
||||
c := ec2metadata.New(sess)
|
||||
d := defaults.Get()
|
||||
return endpointcreds.NewProviderClient(
|
||||
c.Client.Config,
|
||||
c.Client.Handlers,
|
||||
*d.Config,
|
||||
d.Handlers,
|
||||
fmt.Sprintf("http://%s%s", host, uri),
|
||||
func(p *endpointcreds.Provider) { p.ExpiryWindow = 5 * time.Minute })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user