Provide the parameters that you passed. (remove any sensitive info) - No parameters but ami id can be replaced with any ami id
How did you install taskcat? (docker or pip3) - pip3
Are you using a profile, an instance role or access keys to run taskcat? - STS credentials from IAM identity center
Is your AWS environment configured via aws configure? yes
Expected behavior
Taskcat should deploy and tear down resources but its failing even before linting with the error ``TypeError: list indices must be integers or slices, not str``` .
I had added -d flag and figured out the below error
File "/opt/homebrew/lib/python3.11/site-packages/taskcat/_cfn/template.py", line 156, in _find_children
if resource["Type"] == "AWS::CloudFormation::Stack":
Troubleshooting further since the 'Fn::ForEach::Instances': is present in resource block self.template["Resources"].keys() is causing the failure , hence the logic should be updated to handle Fn::ForEach
Screenshots
If applicable, add screenshots to help explain your problem.
**Version (Please make sure you are running the latest version of taskcat)
Taskcat Version (ex: [2018.817.210357]) - version 0.9.41
0.9.41
Note: Python Version (python3 required)
To find versions:
Via taskcat: taskcat -VVia pip3: pip3 show taskcat
Note: both version should match
To update taskcat run:
for docker : docker pull taskcat/taskcatfor pip3: pip3 install --upgrade taskcat
Additional context
Add any other context about the problem here.
Describe the bug Taskcat failing with the error
TypeError: list indices must be integers or slices, not str
when Fn::ForEach exist in the template.To Reproduce Steps to reproduce the behavior:
Are you testing a QuickStart or Custom template? Tested the example AWS template which has Fn::ForEach
Attach or link a copy of the template if possible (remove any sensitive info) - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-foreach-example-resource.html#intrinsic-function-reference-foreach-example-reference-replicated-resource.yaml
Provide the parameters that you passed. (remove any sensitive info) - No parameters but ami id can be replaced with any ami id
How did you install taskcat? (docker or pip3) - pip3
Are you using a profile, an instance role or access keys to run taskcat? - STS credentials from IAM identity center
Is your AWS environment configured via
aws configure
? yesExpected behavior Taskcat should deploy and tear down resources but its failing even before linting with the error ``TypeError: list indices must be integers or slices, not str``` .
I had added -d flag and figured out the below error
Troubleshooting further since the 'Fn::ForEach::Instances': is present in resource block self.template["Resources"].keys() is causing the failure , hence the logic should be updated to handle Fn::ForEach
Screenshots If applicable, add screenshots to help explain your problem.
**Version (Please make sure you are running the latest version of taskcat)
Taskcat Version (ex: [2018.817.210357]) - version 0.9.41 0.9.41
Note: Python Version (python3 required)
To find versions: Via taskcat:
taskcat -V
Via pip3:pip3 show taskcat
Note: both version should match
To update taskcat run: for docker :
docker pull taskcat/taskcat
for pip3:pip3 install --upgrade taskcat
Additional context Add any other context about the problem here.