Merge pull request #3110 from mikegrima/fixcircle

Fixed circular import with RDS and CF
This commit is contained in:
Mike Grima 2020-07-04 17:39:16 -07:00 committed by GitHub
commit 8f81401c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -36,3 +36,13 @@ class DBSubnetGroupNotFoundError(RDSClientError):
"DBSubnetGroupNotFound", "DBSubnetGroupNotFound",
"Subnet Group {0} not found.".format(subnet_group_name), "Subnet Group {0} not found.".format(subnet_group_name),
) )
class UnformattedGetAttTemplateException(Exception):
"""Duplicated from CloudFormation to prevent circular deps."""
description = (
"Template error: resource {0} does not support attribute type {1} in Fn::GetAtt"
)
status_code = 400

View File

@ -3,10 +3,10 @@ from __future__ import unicode_literals
import boto.rds import boto.rds
from jinja2 import Template from jinja2 import Template
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException
from moto.core import BaseBackend, BaseModel from moto.core import BaseBackend, BaseModel
from moto.core.utils import get_random_hex from moto.core.utils import get_random_hex
from moto.ec2.models import ec2_backends from moto.ec2.models import ec2_backends
from moto.rds.exceptions import UnformattedGetAttTemplateException
from moto.rds2.models import rds2_backends from moto.rds2.models import rds2_backends