Open bainss opened 3 years ago
Hi, can you share more details about the failing template or a minimal example template that reproduces this issue? Thanks!
Add double quotes for AWS::AccountId. CreateTestingResources: !Equals [ !Ref "AWS::AccountId", !FindInMap [EnvironmentTypeMappings, testing, accountId] ]
I had the exact same issue today.
Bumping this issue, as I experience it when I attempt to run cfn_nag as a stage in CodePipeline. Run locally - it executes fine, and produces expected output. However, when run in the pipeline - I encounter:
--
191 | CloudFormation/CreateTransitGatewayEnvironmentByRegion.yaml
192 | ------------------------------------------------------------------------------------------------------------------------
193 | | FAIL FATAL
194 | |
195 | | (
This seems to happen with any of my templates - and always on a line with an Intrinsic Function or Substitution. I suspect the answer may lie in "template parameter values", as discussed here:
https://github.com/stelligent/cfn_nag#setting-template-parameter-values
But I'm having trouble wrapping my head around it.
Trying an experiment with some additional quotes, as suggested above.
Interesting: adding the quotes worked - except where doing a !Sub ${AWS::Region} -- in which case, adding them caused cfn-lint (!) to throw a different error. I'm off to the races - thanks for the tip above!
Try wrap info double quotes like "some_line"
Whilst running cfn_nag_scan locally works fine...
however using the github workflow...