You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon using the --resolve flag on a template containing a Select that retrieves its array using a GetAtt, the Attribute returned is a single value instead of an array.
I'm able to get the Error to disappear by creating a parameter file containing the object {"ApiGatewayEndpoint":{"DnsEntries":["String"]}}
But as my use case is as a general scanning tool for checking in code defining every Ref in a prameters file and using --resolve-parameters isn't an option.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cfripper/cli.py", line 222, in cli
results_of_templates = [
File "/usr/local/lib/python3.9/site-packages/cfripper/cli.py", line 223, in <listcomp>
process_template(template=template, resolve_parameters=resolve_parameters, **kwargs)
File "/usr/local/lib/python3.9/site-packages/cfripper/cli.py", line 119, in process_template
cfmodel = cfmodel.resolve(resolve_parameters)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/model/cf_model.py", line 87, in resolve
resolved_resources = {
File "/usr/local/lib/python3.9/site-packages/pycfmodel/model/cf_model.py", line 88, in <dictcomp>
key: resolve(value, extended_parameters, self.Mappings, resolved_conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 54, in resolve
resolved_value = resolve(v, params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 54, in resolve
resolved_value = resolve(v, params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 54, in resolve
resolved_value = resolve(v, params, mappings, conditions)
[Previous line repeated 1 more time]
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 50, in resolve
return function_resolver(function[function_name], params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 84, in resolve_join
resolved_list = resolve(list_values, params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 41, in resolve
resolved_value = resolve(entry, params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 50, in resolve
return function_resolver(function[function_name], params, mappings, conditions)
File "/usr/local/lib/python3.9/site-packages/pycfmodel/resolver.py", line 125, in resolve_select
return resolved_list[resolved_index]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
CPMellows
changed the title
GetAtt returns a single value when a parameter of a Fn::Select
GetAtt returns a string value instead of an array when a parameter of a Fn::Select
Sep 3, 2021
Upon using the --resolve flag on a template containing a Select that retrieves its array using a GetAtt, the Attribute returned is a single value instead of an array.
I'm able to get the Error to disappear by creating a parameter file containing the object
{"ApiGatewayEndpoint":{"DnsEntries":["String"]}}
But as my use case is as a general scanning tool for checking in code defining every Ref in a prameters file and using --resolve-parameters isn't an option.
Template
Output
The text was updated successfully, but these errors were encountered: