aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.46k stars 596 forks source link

!GetAtt DocDB::Cluster.Port is reporting as an integer #3757

Closed kddejong closed 1 month ago

kddejong commented 1 month ago
          @kddejong after this change, it's not clear to me how we're supposed to Output for example an RDS DBCluster's Port, which is a number.

Value: !GetAtt DBCluster.Port fails with E6101 Attempting to cast it with something like Value: !Sub ${DBCluster.Port} also fails with E6101

Unless that is something that changed very recently, CloudFormation used to happily accept Value: !GetAtt DBCluster.Port

Originally posted by @Dantemss in https://github.com/aws-cloudformation/cfn-lint/issues/3725#issuecomment-2419900363

Dantemss commented 1 month ago

My mistake, this is an AWS::DocDB::DBCluster: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html

kddejong commented 1 month ago

This property is an exception. We currently assume that the type for these exceptions matches to the schema definition but that isn't true in this case. Working on a fix.

To be clear its an exception in which the schema doesn't properly define it and we try to fix that missing attribute.