Skip to content

[global] Added hardcoded region to push pull bucket #1413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/pullbox/s3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import (
const (
roleArn = "arn:aws:iam::984256416385:role/JetpackS3Federated"
bucket = "devbox.sh"
// this is a fixed value the bucket resides in this region, otherwise,
// user's default region will get pulled from config and region mismatch
// will result in user not being able to run global push
region = "us-east-2"
)

func assumeRole(ctx context.Context, user *auth.User) (*aws.Config, error) {
Expand Down Expand Up @@ -43,6 +47,7 @@ func assumeRole(ctx context.Context, user *auth.User) (*aws.Config, error) {
),
),
)
config.Region = region
if err != nil {
return nil, errors.WithStack(err)
}
Expand Down