You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/29 17:59:23 UTC

[airflow] branch master updated: Add bucket_name to template fileds in S3 operators (#13973)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new ecfdc60  Add bucket_name to template fileds in S3 operators (#13973)
ecfdc60 is described below

commit ecfdc60bb607fe0d13fa7e315476c607813abab6
Author: Tomek Urbaszek <tu...@gmail.com>
AuthorDate: Fri Jan 29 18:59:06 2021 +0100

    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 88cb166..4bc2d82 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,