ValueError: Fn::Sub not allowed to be nested in None #244
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Template: https://aws-ia-us-east-1.s3.us-east-1.amazonaws.com/cfn-ps-darktrace-vsensor/templates/darktrace-vsensor-workload.template.yaml
Environment:
Python 3.11.5
pip 23.3.1 from /home/user/venv_3.11/lib64/python3.11/site-packages/pip (python 3.11)
cf2tf 0.6.2
Error:
// Converting darktrace-vsensor-workload.template.yaml to Terraform!
Traceback (most recent call last):
File "/home/localadmin/venv_3.11/bin/cf2tf", line 8, in
sys.exit(cli())
^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/app.py", line 44, in cli
config = TemplateConverter(tmpl_path.stem, cf_template, search_manger).convert()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 97, in convert
tf_resources = self.convert_to_tf(self.manifest)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 144, in convert_to_tf
tf_resources.extend(converter(resources))
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 344, in convert_resources
resolved_values = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 176, in resolve_values
data[key] = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 176, in resolve_values
data[key] = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 206, in resolve_values
value = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 206, in resolve_values
value = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 217, in resolve_values
resolved_list_values = [
^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 218, in
self.resolve_values(item, allowed_func, prev_func) for item in data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 176, in resolve_values
data[key] = self.resolve_values(
^^^^^^^^^^^^^^^^^^^^
File "/home/localadmin/venv_3.11/lib64/python3.11/site-packages/cf2tf/convert.py", line 204, in resolve_values
raise ValueError(f"{key} not allowed to be nested in {prev_func}.")
ValueError: Fn::Sub not allowed to be nested in None.
The text was updated successfully, but these errors were encountered: