blob: 9ddb153bb9b06acc6f5e48dba0a4278b928b786a [file] [log] [blame]
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
AWS CloudFormation Operators
============================
`AWS CloudFormation <https://aws.amazon.com/cloudformation/>`__ enables you to create and provision AWS
infrastructure deployments predictably and repeatedly. It helps you leverage AWS products such as Amazon
EC2, Amazon Elastic Block Store, Amazon SNS, Elastic Load Balancing, and Auto Scaling to build highly
reliable, highly scalable, cost-effective applications in the cloud without worrying about creating and
configuring the underlying AWS infrastructure. AWS CloudFormation enables you to use a template file to
create and delete a collection of resources together as a single unit (a stack).
Prerequisite Tasks
------------------
.. include:: _partials/prerequisite_tasks.rst
.. _howto/operator:CloudFormationCreateStackOperator:
AWS CloudFormation Create Stack Operator
""""""""""""""""""""""""""""""""""""""""
To create a new AWS CloudFormation stack use
:class:`~airflow.providers.amazon.aws.operators.cloud_formation.CloudFormationCreateStackOperator`.
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_cloudformation.py
:language: python
:dedent: 4
:start-after: [START howto_operator_cloudformation_create_stack]
:end-before: [END howto_operator_cloudformation_create_stack]
.. _howto/operator:CloudFormationCreateStackSensor:
AWS CloudFormation Create Stack Sensor
""""""""""""""""""""""""""""""""""""""
To wait on the state of an AWS CloudFormation stack creation until it reaches a terminal state you can use
:class:`~airflow.providers.amazon.aws.sensors.cloud_formation.CloudFormationCreateStackSensor`
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_cloudformation.py
:language: python
:dedent: 4
:start-after: [START howto_sensor_cloudformation_create_stack]
:end-before: [END howto_sensor_cloudformation_create_stack]
.. _howto/operator:CloudFormationDeleteStackOperator:
AWS CloudFormation Delete Stack Operator
""""""""""""""""""""""""""""""""""""""""
To delete an AWS CloudFormation stack you can use
:class:`~airflow.providers.amazon.aws.operators.cloud_formation.CloudFormationDeleteStackOperator`.
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_cloudformation.py
:language: python
:dedent: 4
:start-after: [START howto_operator_cloudformation_delete_stack]
:end-before: [END howto_operator_cloudformation_delete_stack]
.. _howto/operator:CloudFormationDeleteStackSensor:
AWS CloudFormation Delete Stack Sensor
""""""""""""""""""""""""""""""""""""""
To wait on the state of an AWS CloudFormation stack deletion until it reaches a terminal state you can use
use :class:`~airflow.providers.amazon.aws.sensors.cloud_formation.CloudFormationDeleteStackSensor`
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_cloudformation.py
:language: python
:dedent: 4
:start-after: [START howto_sensor_cloudformation_delete_stack]
:end-before: [END howto_sensor_cloudformation_delete_stack]
Reference
---------
For further information, look at:
* `Boto3 Library Documentation for CloudFormation <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudformation.html>`__