Skip to content

Commit

Permalink
AWS::MWAA Adding for managed airflow (#1858)
Browse files Browse the repository at this point in the history
* Adding AWS::MWAA for managed airflow

Co-authored-by: Adam Best <abest@dwolla.com>
  • Loading branch information
adam133 and Adam Best authored Mar 27, 2021
1 parent 752db70 commit 43b1d36
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Currently supported AWS resource types
- `AWS::MediaPackage`_
- `AWS::MediaStore`_
- `AWS::MSK`_
- `AWS::MWAA`_
- `AWS::Neptune`_
- `AWS::NetworkFirewall`_
- `AWS::NetworkManager`_
Expand Down Expand Up @@ -511,6 +512,7 @@ See `LICENSE`_ for the troposphere full license text.
.. _`AWS::MediaPackage`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_MediaPackage.html
.. _`AWS::MediaStore`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_MediaStore.html
.. _`AWS::MSK`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_MSK.html
.. _`AWS::MWAA`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_MWAA.html
.. _`AWS::Neptune`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Neptune.html
.. _`AWS::NetworkFirewall`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_NetworkFirewall.html
.. _`AWS::NetworkManager`: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_NetworkManager.html
Expand Down
73 changes: 73 additions & 0 deletions troposphere/mwaa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.

from . import AWSObject, AWSProperty, Tags
from .validators import boolean, integer


class UpdateError(AWSProperty):
props = {
'ErrorCode': (str, False),
'ErrorMessage': (str, False),
}


class LastUpdate(AWSProperty):
props = {
'CreatedAt': (str, False),
'Error': (UpdateError, False),
'Status': (str, False),
}


class ModuleLoggingConfiguration(AWSProperty):
props = {
'CloudWatchLogGroupArn': (str, False),
'Enabled': (boolean, False),
'LogLevel': (str, False),
}


class LoggingConfiguration(AWSProperty):
props = {
'DagProcessingLogs': (ModuleLoggingConfiguration, False),
'SchedulerLogs': (ModuleLoggingConfiguration, False),
'TaskLogs': (ModuleLoggingConfiguration, False),
'WebserverLogs': (ModuleLoggingConfiguration, False),
'WorkerLogs': (ModuleLoggingConfiguration, False),
}


class NetworkConfiguration(AWSProperty):
props = {
'SecurityGroupIds': (list, True),
'SubnetIds': (list, True),
}


class Environment(AWSObject):
resource_type = "AWS::MWAA::Environment"

props = {
'AirflowConfigurationOptions': (str, False),
'AirflowVersion': (str, False),
'DagS3Path': (str, True),
'EnvironmentClass': (str, False),
'ExecutionRoleArn': (str, True),
'KmsKey': (str, False),
'LoggingConfiguration': (LoggingConfiguration, False),
'MaxWorkers': (integer, False),
'NetworkConfiguration': (NetworkConfiguration, True),
'PluginsS3ObjectVersion': (str, False),
'PluginsS3Path': (str, False),
'RequirementsS3ObjectVersion': (str, False),
'RequirementsS3Path': (str, False),
'SourceBucketArn': (str, True),
'WebserverAccessMode': (str, False),
'WebserverUrl': (str, False),
'WeeklyMaintenanceWindowStart': (str, False),
'Name': (str, True),
'Tags': (Tags, False),
}

0 comments on commit 43b1d36

Please # to comment.