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

Update findinmap resolv to handle Ref psedueparams #3785

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

kddejong
Copy link
Contributor

Issue #, if available:
fix #3784

Description of changes:

  • This will update the FindInMap resolver to look for a secondary key to match a string when the top level key is a Ref to a pseudo-parameter (AWS::AccountId or AWS::Region)
  • We will return 0 results if the top level key is a Ref to a pseudo parameter and the second level is also a Ref
  • Return a resolution failure if the top level key is a ref to a pseudo parameter and the second level key cannot be found in in the mapping
  • Return a resolution failure if the top level key is a ref to a pseudo parameter (AWS::AccountId or AWS::Region) and none of the keys match an accound ID regex or region name.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.78%. Comparing base (a6eb97a) to head (b34d5c0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3785   +/-   ##
=======================================
  Coverage   93.78%   93.78%           
=======================================
  Files         363      363           
  Lines       12394    12414   +20     
  Branches     2530     2541   +11     
=======================================
+ Hits        11624    11643   +19     
  Misses        429      429           
- Partials      341      342    +1     
Flag Coverage Δ
unittests 93.74% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kddejong kddejong merged commit 74847b1 into aws-cloudformation:main Oct 23, 2024
24 checks passed
@kddejong kddejong deleted the fix/issue/3784 branch October 23, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cfn-lint is not validating the FindInMap function for Mappings under RegionMap.
1 participant