diff --git a/CLOUDFORMATION_COVERAGE.md b/CLOUDFORMATION_COVERAGE.md index 60619ff07..44f33f1c8 100644 --- a/CLOUDFORMATION_COVERAGE.md +++ b/CLOUDFORMATION_COVERAGE.md @@ -272,8 +272,7 @@ - [x] create implemented - [ ] update implemented - [ ] delete implemented - - [ ] Fn::GetAtt implemented - - [ ] Arn + - [x] Fn::GetAtt implemented - AWS::RDS::DBParameterGroup: - [x] create implemented - [ ] update implemented diff --git a/moto/logs/models.py b/moto/logs/models.py index f3fe935ee..633cb2704 100644 --- a/moto/logs/models.py +++ b/moto/logs/models.py @@ -306,6 +306,23 @@ class LogGroup(CloudFormationModel): resource_name, tags, **properties ) + @classmethod + def has_cfn_attr(cls, attr: str) -> bool: + return attr in [ + "Arn", + ] + + def get_cfn_attribute(self, attribute_name: str) -> str: + from moto.cloudformation.exceptions import UnformattedGetAttTemplateException + + if attribute_name == "Arn": + return self.arn + raise UnformattedGetAttTemplateException() + + @property + def physical_resource_id(self) -> str: + return self.name + def create_log_stream(self, log_stream_name: str) -> None: if log_stream_name in self.streams: raise ResourceAlreadyExistsException()