File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ type Config struct {
1818 Username string `envconfig:"USERNAME" required:"true"`
1919 Fingerprint string `envconfig:"FINGERPRINT" required:"true"`
2020 PodNamespace string `envconfig:"POD_NAMESPACE" required:"true"`
21+ StorageRegion string `envconfig:"STORAGE_REGION" default:""`
2122}
2223
2324func (c Config ) App () string {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func Run(conf *Config) error {
3232 }
3333 builderKey := string (builderKeyBytes )
3434
35- s3Client , err := storage .GetClient ()
35+ s3Client , err := storage .GetClient (conf . StorageRegion )
3636 if err != nil {
3737 return fmt .Errorf ("configuring S3 client (%s)" , err )
3838 }
Original file line number Diff line number Diff line change 66 "github.com/aws/aws-sdk-go/service/s3"
77)
88
9- func GetClient () (* s3.S3 , error ) {
9+ func GetClient (region string ) (* s3.S3 , error ) {
1010 awsCfg := new (aws.Config )
11+ awsCfg .Region = aws .String (region )
1112 endpt , err := getEndpoint ()
1213 if err != nil {
1314 return nil , err
You can’t perform that action at this time.
0 commit comments