Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/terraform-linters/…
Browse files Browse the repository at this point in the history
…setup-tflint-4.1.0
  • Loading branch information
zacbrown authored Dec 3, 2024
2 parents 2b61230 + b4391dd commit 68fb5ce
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,16 @@ def is_enabled(self) -> bool:
return is_enabled

def _setup_bucket(self):
self.log.info(f'setting up test s3 bucket ({self.test_bucket_name})')
self.s3.create_bucket(Bucket=self.test_bucket_name, CreateBucketConfiguration={
'LocationConstraint': self.test_bucket_region})
self.log.info(f'setting up test s3 bucket ({self.test_bucket_name}) with LocationConstraint ({self.test_bucket_region})')
try:
self.s3.create_bucket(Bucket=self.test_bucket_name, CreateBucketConfiguration={
'LocationConstraint': self.test_bucket_region})
self.log.info(f'test s3 bucket ({self.test_bucket_name}) created')
except Exception as e:
self.log.info(f'failed to create test s3 bucket ({self.test_bucket_name}) with LocationConstraint ({self.test_bucket_region}) - exception: {e} - retrying without LocationConstraint, please request access to S3Select')
self.s3.create_bucket(Bucket=self.test_bucket_name)
self.log.info(f'test s3 bucket ({self.test_bucket_name}) created without LocationConstraint')


def _cleanup_bucket(self):
self.log.info(f'cleaning up test s3 bucket ({self.test_bucket_name})')
Expand Down

0 comments on commit 68fb5ce

Please sign in to comment.