# Path: stacker_blueprints/rds/base.py
# def validate_backup_retention_period(value):
#     if not (0 <= value <= 35):
#         raise ValueError(
#             "Backup retention period must be between 0 and 35."
#         )
#     return value


from troposphere import (
    GetAtt, Ref, ec2, Output, Tags
)
from troposphere.rds import (
    DBSubnetGroup,
    DBClusterParameterGroup,
    DBCluster,
)
from troposphere.route53 import RecordSetType
from stacker.blueprints.base import Blueprint
from stacker.blueprints.variables.types import CFNString
from stacker_blueprints.rds.base import validate_backup_retention_period
            parameter_group = Ref(PARAMETER_GROUP)

        t.add_resource(
            DBCluster(
                DBCLUSTER,
                BackupRetentionPeriod=variables["BackupRetentionPeriod"],
                DBClusterParameterGroupName=parameter_group,
                DBSubnetGroupName=Ref(SUBNET_GROUP),
                Engine=self.engine() or variables["Engine"],
                EngineVersion=variables["EngineVersion"],
                MasterUsername=variables["MasterUser"],
                MasterUserPassword=Ref("MasterUserPassword"),
                PreferredBackupWindow=variables["PreferredBackupWindow"],
                PreferredMaintenanceWindow=variables[
                    "PreferredMaintenanceWindow"],
                Tags=self.get_tags(),
                VpcSecurityGroupIds=[self.security_group, ]
            )
        )

    def create_dns_records(self):
        t = self.template
        variables = self.get_variables()

        # Setup CNAME to cluster
        if self.should_create_internal_hostname():
            hostname = "%s.%s" % (
                variables["InternalHostname"],
                variables["InternalZoneName"]
            )

# Path: stacker_blueprints/rds/base.py
# def validate_backup_retention_period(value):
#     if not (0 <= value <= 35):
#         raise ValueError(
#             "Backup retention period must be between 0 and 35."
#         )
#     return value


# Path: stacker_blueprints/rds/aurora/base.py
from troposphere import (
    GetAtt, Ref, ec2, Output, Tags
)
from troposphere.rds import (
    DBSubnetGroup,
    DBClusterParameterGroup,
    DBCluster,
)
from troposphere.route53 import RecordSetType
from stacker.blueprints.base import Blueprint
from stacker.blueprints.variables.types import CFNString
from stacker_blueprints.rds.base import validate_backup_retention_period

            parameter_group = Ref(PARAMETER_GROUP)

        t.add_resource(
            DBCluster(
                DBCLUSTER,
                BackupRetentionPeriod=variables["BackupRetentionPeriod"],
                DBClusterParameterGroupName=parameter_group,
                DBSubnetGroupName=Ref(SUBNET_GROUP),
                Engine=self.engine() or variables["Engine"],
                EngineVersion=variables["EngineVersion"],
                MasterUsername=variables["MasterUser"],
                MasterUserPassword=Ref("MasterUserPassword"),
                PreferredBackupWindow=variables["PreferredBackupWindow"],
                PreferredMaintenanceWindow=variables[
                    "PreferredMaintenanceWindow"],
                Tags=self.get_tags(),
                VpcSecurityGroupIds=[self.security_group, ]
            )
        )

    def create_dns_records(self):
        t = self.template
        variables = self.get_variables()

        # Setup CNAME to cluster
        if self.should_create_internal_hostname():
            hostname = "%s.%s" % (
                variables["InternalHostname"],
                variables["InternalZoneName"]
            )

            t.add_resource(