Add AWS_REGION env var to specify s3 region

This commit is contained in:
mdauphin authored and Alexander Neumann committed 2019-11-22 15:04:48 +01:00
1 parent aa5af8af0e
commit df500a372d
3 files changed
+6 -1

No files matched your search

+4
View File
@@ -485,6 +485,10 @@ func parseConfig(loc location.Location, opts options.Options) (interface{}, erro
cfg.Secret = os.Getenv("AWS_SECRET_ACCESS_KEY")
}
if cfg.Region == "" {
cfg.Region = os.Getenv("AWS_REGION")
}
if err := opts.Apply(loc.Scheme, &cfg); err != nil {
return nil, err
}