Closed randybasrs closed 12 hours ago
Thanks for reporting this there are two things the PR will address.
We normalize the ::module resource type to do minimal validation and not create false positives. In your use case you are providing that parameter so we should see if we have a type available before escaping to a generic module schema.
CloudFormation Lint Version
1.4.2
What operating system are you using?
Windows/AWS Serverless
Describe the bug
When we lint any templates with more than 1 entry for a registered code module, it triggers E3019: Primary identifiers {} should have unique values across the resources {'resource2', 'resource1'}. We can't seem to provide the custom schema with the primaryIdentifer value set via a .cfnlintrc file either as it appears to just be ignored. If we change the templates and schemas to use a custom resource type that isn't a code module the schema is picked up and properly lints E3019.
Expected behavior
Schemas for code modules should be supported via registry_schemas like other custom resource types
This seems to be mentioned tangentally in #1811 but in this case I already have the schema files, they just don't seem to work for anything ending with ::MODULE
Reproduction template
Note that this is a simplified schema as the code module has parameters rather than only properties.