aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Assert rules was unable to check the empty strings
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
I want the CFT to throw an error when the Cidr2ndary value is empty if the IsCidrRequired is true. But the Assertion doesn't throw any error when no value is defined for Cidr2ndary when the IsCidrRequired is true.
The AWS document below has an example that has similar use case but that doesn't seem to be working. I think this is an limitation or bug in CFT when trying it from web console
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/rules-section-structure.html
Parameters:
IsCidrRequired:
Type: String
Default: 'false'
Cidr2ndary:
Type: String
Default: ""
Rules:
testIsCidrRequired:
RuleCondition: !Equals
- !Ref IsCidrRequired
- 'true'
Assertions:
- Assert: !Not
- !Equals
- !Ref Cidr2ndary
- AWS::NoValue
AssertDescription: 'If IsCidrRequired == True, then Cidr2ndary must be specified'
Contributor guide
Research direction
Start by reproducing the template from the issue in the AWS CloudFormation web console, using the linked Rules section documentation as the reference. Verify whether an empty Cidr2ndary value with IsCidrRequired set to true produces an assertion error; done means the documented required-value behavior is enforced or the limitation is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100