We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
aws
us-east-1
1 parent 3fa92f3 commit 7b14283Copy full SHA for 7b14283
task/aws/resources/resource_bucket.go
@@ -29,10 +29,12 @@ type Bucket struct {
29
30
func (b *Bucket) Create(ctx context.Context) error {
31
createInput := s3.CreateBucketInput{
32
- Bucket: aws.String(b.Identifier),
33
- CreateBucketConfiguration: &types.CreateBucketConfiguration{
34
- LocationConstraint: types.BucketLocationConstraint(b.Client.Region),
35
- },
+ Bucket: aws.String(b.Identifier),
+ CreateBucketConfiguration: &types.CreateBucketConfiguration{},
+ }
+
36
+ if b.Client.Region != "us-east-1" {
37
+ createInput.CreateBucketConfiguration.LocationConstraint = types.BucketLocationConstraint(b.Client.Region)
38
}
39
40
if _, err := b.Client.Services.S3.CreateBucket(ctx, &createInput); err != nil {
0 commit comments