cloudformation-resource-schema icon indicating copy to clipboard operation
cloudformation-resource-schema copied to clipboard

Validate the type of properties in `primaryIdentifier`

Open wbingli opened this issue 4 years ago • 2 comments

Only String or Number type property can be primaryIdentifier. We should enforce it during schema validation.

wbingli avatar Jul 08 '20 19:07 wbingli

@wbingli related: see https://github.com/aws-cloudformation/aws-cloudformation-resource-schema/issues/87 for request for array type primaryIdentifiers

PatMyron avatar Aug 31 '20 19:08 PatMyron

Should list-valued identifiers be allowed?

We're creating a resource provider for the sorely-needed S3 bucket notification resource. While the notifications have individual IDs, there is a constraint that no two notifications can overlap in prefix+events. So we had this idea of using that combination as an identifier.

This case is less of a list-valued identifier, and more of a set-valued constraint, but I wanted to raise the question for discussion if others had ideas about when a list-valued identifier would be useful. Given that the primary identifier itself can be list-valued, it seems plausible that sometimes the list wouldn't come from a series of scalar properties but from a single property containing that list.

benkehoe avatar Aug 31 '20 20:08 benkehoe