How to use the runway.cfngin.blueprints.variables.types.CFNType function in runway

To help you get started, we’ve selected a few runway examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
"AWS::SSM::Parameter::Value")
SSMParameterValueRoute53HostedZoneId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2AvailabilityZoneNameList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2ImageIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2InstanceIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SecurityGroupGroupNameList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SecurityGroupIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SubnetIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2VolumeIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2VPCIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueRoute53HostedZoneIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
# AWS-Specific Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types
EC2AvailabilityZoneName = CFNType("AWS::EC2::AvailabilityZone::Name")
EC2ImageId = CFNType("AWS::EC2::Image::Id")
EC2InstanceId = CFNType("AWS::EC2::Instance::Id")
EC2KeyPairKeyName = CFNType("AWS::EC2::KeyPair::KeyName")
EC2SecurityGroupGroupName = CFNType("AWS::EC2::SecurityGroup::GroupName")
EC2SecurityGroupId = CFNType("AWS::EC2::SecurityGroup::Id")
EC2SubnetId = CFNType("AWS::EC2::Subnet::Id")
EC2VolumeId = CFNType("AWS::EC2::Volume::Id")
EC2VPCId = CFNType("AWS::EC2::VPC::Id")
Route53HostedZoneId = CFNType("AWS::Route53::HostedZone::Id")
EC2AvailabilityZoneNameList = CFNType("List")
EC2ImageIdList = CFNType("List")
EC2InstanceIdList = CFNType("List")
EC2SecurityGroupGroupNameList = CFNType(
    "List")
EC2SecurityGroupIdList = CFNType("List")
EC2SubnetIdList = CFNType("List")
EC2VolumeIdList = CFNType("List")
EC2VPCIdList = CFNType("List")
Route53HostedZoneIdList = CFNType("List")

# SSM Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
EC2AvailabilityZoneName = CFNType("AWS::EC2::AvailabilityZone::Name")
EC2ImageId = CFNType("AWS::EC2::Image::Id")
EC2InstanceId = CFNType("AWS::EC2::Instance::Id")
EC2KeyPairKeyName = CFNType("AWS::EC2::KeyPair::KeyName")
EC2SecurityGroupGroupName = CFNType("AWS::EC2::SecurityGroup::GroupName")
EC2SecurityGroupId = CFNType("AWS::EC2::SecurityGroup::Id")
EC2SubnetId = CFNType("AWS::EC2::Subnet::Id")
EC2VolumeId = CFNType("AWS::EC2::Volume::Id")
EC2VPCId = CFNType("AWS::EC2::VPC::Id")
Route53HostedZoneId = CFNType("AWS::Route53::HostedZone::Id")
EC2AvailabilityZoneNameList = CFNType("List")
EC2ImageIdList = CFNType("List")
EC2InstanceIdList = CFNType("List")
EC2SecurityGroupGroupNameList = CFNType(
    "List")
EC2SecurityGroupIdList = CFNType("List")
EC2SubnetIdList = CFNType("List")
EC2VolumeIdList = CFNType("List")
EC2VPCIdList = CFNType("List")
Route53HostedZoneIdList = CFNType("List")

# SSM Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
# Each AWS-specific type here is repeated from the the list above
SSMParameterValueEC2AvailabilityZoneName = CFNType(
    "AWS::SSM::Parameter::Value")
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
# Each AWS-specific type here is repeated from the the list above
SSMParameterValueEC2AvailabilityZoneName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2ImageId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2InstanceId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2KeyPairKeyName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupGroupName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SubnetId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VolumeId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VPCId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueRoute53HostedZoneId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2AvailabilityZoneNameList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2ImageIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2InstanceIdList = CFNType(
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
parameter_type (str): An AWS specific parameter type
                (http://goo.gl/PthovJ)

        """
        self.parameter_type = parameter_type


# General CFN types
CFNString = CFNType("String")
CFNNumber = CFNType("Number")
CFNNumberList = CFNType("List")
CFNCommaDelimitedList = CFNType("CommaDelimitedList")

# AWS-Specific Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types
EC2AvailabilityZoneName = CFNType("AWS::EC2::AvailabilityZone::Name")
EC2ImageId = CFNType("AWS::EC2::Image::Id")
EC2InstanceId = CFNType("AWS::EC2::Instance::Id")
EC2KeyPairKeyName = CFNType("AWS::EC2::KeyPair::KeyName")
EC2SecurityGroupGroupName = CFNType("AWS::EC2::SecurityGroup::GroupName")
EC2SecurityGroupId = CFNType("AWS::EC2::SecurityGroup::Id")
EC2SubnetId = CFNType("AWS::EC2::Subnet::Id")
EC2VolumeId = CFNType("AWS::EC2::Volume::Id")
EC2VPCId = CFNType("AWS::EC2::VPC::Id")
Route53HostedZoneId = CFNType("AWS::Route53::HostedZone::Id")
EC2AvailabilityZoneNameList = CFNType("List")
EC2ImageIdList = CFNType("List")
EC2InstanceIdList = CFNType("List")
EC2SecurityGroupGroupNameList = CFNType(
    "List")
EC2SecurityGroupIdList = CFNType("List")
EC2SubnetIdList = CFNType("List")
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
"AWS::SSM::Parameter::Value")
SSMParameterValueEC2InstanceId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2KeyPairKeyName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupGroupName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SubnetId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VolumeId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VPCId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueRoute53HostedZoneId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2AvailabilityZoneNameList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2ImageIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2InstanceIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SecurityGroupGroupNameList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SecurityGroupIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2SubnetIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2VolumeIdList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueEC2VPCIdList = CFNType(
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
EC2VolumeIdList = CFNType("List")
EC2VPCIdList = CFNType("List")
Route53HostedZoneIdList = CFNType("List")

# SSM Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
# Each AWS-specific type here is repeated from the the list above
SSMParameterValueEC2AvailabilityZoneName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2ImageId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2InstanceId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2KeyPairKeyName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupGroupName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SecurityGroupId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2SubnetId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VolumeId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2VPCId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueRoute53HostedZoneId = CFNType(
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
EC2SecurityGroupGroupName = CFNType("AWS::EC2::SecurityGroup::GroupName")
EC2SecurityGroupId = CFNType("AWS::EC2::SecurityGroup::Id")
EC2SubnetId = CFNType("AWS::EC2::Subnet::Id")
EC2VolumeId = CFNType("AWS::EC2::Volume::Id")
EC2VPCId = CFNType("AWS::EC2::VPC::Id")
Route53HostedZoneId = CFNType("AWS::Route53::HostedZone::Id")
EC2AvailabilityZoneNameList = CFNType("List")
EC2ImageIdList = CFNType("List")
EC2InstanceIdList = CFNType("List")
EC2SecurityGroupGroupNameList = CFNType(
    "List")
EC2SecurityGroupIdList = CFNType("List")
EC2SubnetIdList = CFNType("List")
EC2VolumeIdList = CFNType("List")
EC2VPCIdList = CFNType("List")
Route53HostedZoneIdList = CFNType("List")

# SSM Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
# Each AWS-specific type here is repeated from the the list above
SSMParameterValueEC2AvailabilityZoneName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2ImageId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2InstanceId = CFNType(
    "AWS::SSM::Parameter::Value")
github onicagroup / runway / runway / cfngin / blueprints / base.py View on Github external
Args:
        var_name (str): The name of the defined variable on a blueprint.
        var_type (type): The type that the value should be.
        value (Any): The object representing the value provided for the
            variable

    Returns:
        Any: The appropriate value object. If the original value
        was of CFNType, the returned value will be wrapped in CFNParameter.

    Raises:
        ValueError: If the `value` isn't of `var_type` and can't be cast as
            that type, this is raised.

    """
    if isinstance(var_type, CFNType):
        value = CFNParameter(name=var_name, value=value)
    elif isinstance(var_type, TroposphereType):
        try:
            value = var_type.create(value)
        except Exception as exc:
            name = "{}.create".format(var_type.resource_name)
            raise ValidatorError(var_name, name, value, exc)
    else:
        if not isinstance(value, var_type):
            raise ValueError(
                "Value for variable %s must be of type %s. Actual "
                "type: %s." % (var_name, var_type, type(value))
            )

    return value
github onicagroup / runway / runway / cfngin / blueprints / variables / types.py View on Github external
EC2KeyPairKeyName = CFNType("AWS::EC2::KeyPair::KeyName")
EC2SecurityGroupGroupName = CFNType("AWS::EC2::SecurityGroup::GroupName")
EC2SecurityGroupId = CFNType("AWS::EC2::SecurityGroup::Id")
EC2SubnetId = CFNType("AWS::EC2::Subnet::Id")
EC2VolumeId = CFNType("AWS::EC2::Volume::Id")
EC2VPCId = CFNType("AWS::EC2::VPC::Id")
Route53HostedZoneId = CFNType("AWS::Route53::HostedZone::Id")
EC2AvailabilityZoneNameList = CFNType("List")
EC2ImageIdList = CFNType("List")
EC2InstanceIdList = CFNType("List")
EC2SecurityGroupGroupNameList = CFNType(
    "List")
EC2SecurityGroupIdList = CFNType("List")
EC2SubnetIdList = CFNType("List")
EC2VolumeIdList = CFNType("List")
EC2VPCIdList = CFNType("List")
Route53HostedZoneIdList = CFNType("List")

# SSM Parameter Types
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types
SSMParameterName = CFNType("AWS::SSM::Parameter::Name")
SSMParameterValueString = CFNType("AWS::SSM::Parameter::Value")
SSMParameterValueStringList = CFNType(
    "AWS::SSM::Parameter::Value>")
SSMParameterValueCommaDelimitedList = CFNType(
    "AWS::SSM::Parameter::Value")
# Each AWS-specific type here is repeated from the the list above
SSMParameterValueEC2AvailabilityZoneName = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2ImageId = CFNType(
    "AWS::SSM::Parameter::Value")
SSMParameterValueEC2InstanceId = CFNType(