Created
December 1, 2017 16:49
-
-
Save dokipen/d04c0aac4c2b56ba5cecccd0aa1aba07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
tropo.py implements resource types not yet supported by troposphere. This module | |
is ever changing and should be updated when troposphere is upgraded. | |
""" | |
from __future__ import print_function | |
from troposphere import AWSObject, AWSProperty | |
from troposphere.validators import positive_integer | |
from troposphere.ecs import ( | |
ContainerDefinition, | |
DeploymentConfiguration, | |
LoadBalancer, | |
PlacementConstraint, | |
PlacementStrategy, | |
Volume) | |
class AwsvpcConfiguration(AWSProperty): | |
props = { | |
"AssignPublicIp": (basestring, False), | |
"SecurityGroups": ([basestring], False), | |
"Subnets": ([basestring], True)} | |
class NetworkConfiguration(AWSProperty): | |
props = { | |
"AwsvpcConfiguration": (AwsvpcConfiguration, True)} | |
class Service(AWSObject): | |
""" | |
Service implements Fargate in troposphere. | |
""" | |
resource_type = "AWS::ECS::Service" | |
props = { | |
"Cluster": (basestring, False), | |
"DeploymentConfiguration": (DeploymentConfiguration, False), | |
"DesiredCount": (positive_integer, False), | |
"LaunchType": (basestring, False), | |
"LoadBalancers": ([LoadBalancer], False), | |
"NetworkConfiguration": (NetworkConfiguration, False), | |
"Role": (basestring, False), | |
"PlacementConstraints": ([PlacementConstraint], False), | |
"PlacementStrategies": ([PlacementStrategy], False), | |
"ServiceName": (basestring, False), | |
"TaskDefinition": (basestring, True)} | |
class TaskDefinition(AWSObject): | |
resource_type = "AWS::ECS::TaskDefinition" | |
props = { | |
"ContainerDefinitions": ([ContainerDefinition], True), | |
"ExecutionRoleArn": (basestring, False), | |
"Family": (basestring, False), | |
"Memory": (basestring, False), | |
"Cpu": (basestring, False), | |
"NetworkMode": (basestring, False), | |
"PlacementConstraints": ([PlacementConstraints], False), | |
"RequiresCompatabilities": ([basestring], False), | |
"TaskRoleArn": (basestring, False), | |
"Volumes": ([Volume], False)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment