Open thbishop-intuit opened 4 years ago
I re-implemented this, having failed to find this ticket and its PR beforehand. Oops! I am also eager to see this done – there are linting tools (including AWS' own cfn-lint
) which complain about the redundant DependsOn
s.
This can be resolved by adding a .cfnlintrc.yaml file with the following:
ignore_checks:
- W3005
But it would be better not to have to ignore that check globally to fix this
Bump as this is still happening. Any updates as of now?
Also bump, still happening and breaking lint.
Will apply ignore fix from above but that of course disables the check on user written template code also.
Description: Specifying an API usage plan will populate
DependsOn
with resources that are already included as aRef
inProperties
. There are a couple of places where this currently occurs. To be clear, this doesn't break functionality but it does report as a warning in cfn-lint (which is how I came across this).Is this extra
DependsOn
perhaps needed to handle a very specific use case? I'm more than happy to submit a fix if these extra declarations are not needed.Steps to reproduce the issue:
develop
at the time of this bug).Observed result: These are from the translator test outputs:
A couple of examples for usage plan resource: https://github.com/awslabs/serverless-application-model/blob/1b2d6f25514780d918b1bebf262ea05b89c5e646/tests/translator/output/api_with_usageplans.json#L392-L430
https://github.com/awslabs/serverless-application-model/blob/1b2d6f25514780d918b1bebf262ea05b89c5e646/tests/translator/output/api_with_usageplans.json#L365-L391
And a couple of examples for usage plan key resource: https://github.com/awslabs/serverless-application-model/blob/1b2d6f25514780d918b1bebf262ea05b89c5e646/tests/translator/output/api_with_usageplans.json#L83-L97
https://github.com/awslabs/serverless-application-model/blob/1b2d6f25514780d918b1bebf262ea05b89c5e646/tests/translator/output/api_with_usageplans.json#L530-L544
Expected result: I would expect the usage plan resource to look like:
And for usage plan key resources: