From ecfdc60bb607fe0d13fa7e315476c607813abab6 Mon Sep 17 00:00:00 2001 From: Tomek Urbaszek Date: Fri, 29 Jan 2021 18:59:06 +0100 Subject: [PATCH] Add bucket_name to template fileds in S3 operators (#13973) Without that it's impossible to create buckets using for example execution date. And that is quite common case. --- airflow/providers/amazon/aws/operators/s3_bucket.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airflow/providers/amazon/aws/operators/s3_bucket.py b/airflow/providers/amazon/aws/operators/s3_bucket.py index 88cb16693059d..4bc2d8206105d 100644 --- a/airflow/providers/amazon/aws/operators/s3_bucket.py +++ b/airflow/providers/amazon/aws/operators/s3_bucket.py @@ -39,6 +39,8 @@ class S3CreateBucketOperator(BaseOperator): :type region_name: Optional[str] """ + template_fields = ("bucket_name",) + @apply_defaults def __init__( self, @@ -79,6 +81,8 @@ class S3DeleteBucketOperator(BaseOperator): :type aws_conn_id: Optional[str] """ + template_fields = ("bucket_name",) + def __init__( self, bucket_name: str,