Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "terraform-worker"
version = "0.10.9"
version = "0.10.10"
description = "An orchestration tool for Terraform"
authors = [
"Richard Maynard <[email protected]>",
Expand Down
14 changes: 14 additions & 0 deletions tfworker/backends/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ def __init__(self, authenticators, definitions, deployment=None):
self._s3_client.head_bucket(Bucket=self._authenticator.bucket)
except botocore.exceptions.ClientError as err:
err_str = str(err)
if "Forbidden" in err_str:
click.secho(
"Possibly re-using a bucket name? Bucket names should be globally unique.",
fg="red",
)
click.secho(err, fg="red")
sys.exit(5)
if "Not Found" not in err_str:
raise err
if self._authenticator.create_backend_bucket:
Expand All @@ -89,6 +96,13 @@ def __init__(self, authenticators, definitions, deployment=None):
if "PYTEST_CURRENT_TEST" not in os.environ:
click.secho(err_str, fg="red")
sys.exit(4)
elif "conflicting conditional operation" in err_str:
click.secho(
"Possibly a recent bucket delete operation in another account has not completed.",
fg="red",
)
click.secho(err, fg="red")
sys.exit(6)
elif "BucketAlreadyOwnedByYou" not in err_str:
raise err

Expand Down