Skip to content

Commit

Permalink
objstore: Expose S3 region attribute (#1060)
Browse files Browse the repository at this point in the history
Minio is able to autodetect the region for cloud providers like AWS but the logic fails with Scaleway Object Storage solution.

Related issue on Minio: minio/mc#2570
  • Loading branch information
julien-sobczak authored and bwplotka committed Apr 23, 2019
1 parent 8657623 commit d4bed47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const DirDelim = "/"
type Config struct {
Bucket string `yaml:"bucket"`
Endpoint string `yaml:"endpoint"`
Region string `yaml:"region"`
AccessKey string `yaml:"access_key"`
Insecure bool `yaml:"insecure"`
SignatureV2 bool `yaml:"signature_version2"`
Expand Down Expand Up @@ -122,7 +123,7 @@ func NewBucketWithConfig(logger log.Logger, config Config, component string) (*B
}
}

client, err := minio.NewWithCredentials(config.Endpoint, credentials.NewChainCredentials(chain), !config.Insecure, "")
client, err := minio.NewWithCredentials(config.Endpoint, credentials.NewChainCredentials(chain), !config.Insecure, config.Region)
if err != nil {
return nil, errors.Wrap(err, "initialize s3 client")
}
Expand Down

0 comments on commit d4bed47

Please sign in to comment.