mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
adds check for region with custom s3 endpoint (#1465)
This commit is contained in:
parent
c2deee9911
commit
9d45b46f4c
@ -75,6 +75,11 @@ func (fs *FS) Init() error {
|
||||
if len(fs.CustomEndpoint) > 0 {
|
||||
// Use provided custom endpoint for S3
|
||||
logger.Infof("Using provided custom S3 endpoint: %q", fs.CustomEndpoint)
|
||||
// hack for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1449
|
||||
if sess.Config.Region == nil || *sess.Config.Region == "" {
|
||||
logger.Infof("Region is not defined for custom S3 endpoint, using `us-east-1` as default")
|
||||
sess.Config.WithRegion("us-east-1")
|
||||
}
|
||||
sess.Config.WithEndpoint(fs.CustomEndpoint)
|
||||
|
||||
// Disable prefixing endpoint with bucket name
|
||||
|
Loading…
Reference in New Issue
Block a user