Add AWS_REGION env var to specify s3 region

This commit is contained in:
mdauphin
2019-11-22 15:04:48 +01:00
committed by Alexander Neumann
parent aa5af8af0e
commit df500a372d
3 changed files with 6 additions and 1 deletions
+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
}