Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E3005/W1001 reported, although the concern is addressed with the Rules/Assertions #1888

Closed
tekdj7 opened this issue Feb 2, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tekdj7
Copy link

tekdj7 commented Feb 2, 2021

cfn-lint version: (cfn-lint --version)
0.44.6 (also already ran, cfn-lint -u)

Description of issue.
Using the AWS Quick Start aws-vpc.template, cfn-lint is reporting several E3005 & W1001 issues, even though the concern is addressed with the Rules/Assertions in the template. Below is a sample of some of the errors:

  • [cfn-lint] E3005: DependsOn VPCGatewayAttachment may not exist when condition when condition "NATGatewaysCondition" is True and when condition "PublicSubnetsCondition" is False at Resources/NAT1EIP/DependsOn
  • [cfn-lint] W1001: Ref to resource "PrivateSubnet1ARouteTable" that may not be available when condition "NATGatewaysCondition" is True and when condition "PrivateSubnetsCondition" is False at Resources/PrivateSubnet1ARoute/Properties/RouteTableId/Ref
@kddejong
Copy link
Contributor

kddejong commented Feb 2, 2021

For now you may want to look at resource based exceptions or template exceptions for this. This change is going to take some work and testing. Right now we resolve condition relationships based on parameter values. Adding in rule logic will take us a little time to resolve.

@kddejong kddejong added the enhancement New feature or request label Feb 2, 2021
@awsstudygroup2021
Copy link

wher is the PrivateSubnetsCondition? I dont see it on the internet or any AWS document. Thanks

@chrisoverzero
Copy link
Contributor

@awsstudygroup2021

It's not any universal CloudFormation thing. It's a named Condition from the template referenced in the original post:

Conditions:
  PrivateSubnetsCondition: !Equals [!Ref 'CreatePrivateSubnets', 'true']

@kddejong
Copy link
Contributor

kddejong commented Sep 6, 2024

We now account for some level of Rules. We cannot account for all assertions possible but the standard And/Or/Not/Equals are now covered. I can handle any additional issues for other rules/assertions via request.

@kddejong kddejong closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants