Skip to content

Commit

Permalink
Add bucket_name to template fileds in S3 operators (apache#13973)
Browse files Browse the repository at this point in the history
Without that it's impossible to create buckets using for example
execution date. And that is quite common case.
  • Loading branch information
turbaszek authored Jan 29, 2021
1 parent b4885b2 commit ecfdc60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions airflow/providers/amazon/aws/operators/s3_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class S3CreateBucketOperator(BaseOperator):
:type region_name: Optional[str]
"""

template_fields = ("bucket_name",)

@apply_defaults
def __init__(
self,
Expand Down Expand Up @@ -79,6 +81,8 @@ class S3DeleteBucketOperator(BaseOperator):
:type aws_conn_id: Optional[str]
"""

template_fields = ("bucket_name",)

def __init__(
self,
bucket_name: str,
Expand Down

0 comments on commit ecfdc60

Please sign in to comment.