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
I am trying to use the output of a Terraform module, and inject them into resources.
However, referring to a module object fails with the following error:
$ terraformpy
terraformpy - Processing: main.tf.py
Traceback (most recent call last):
File "/private/tmp/terraformpy-bug/.venv/bin/terraformpy", line 10, in<module>sys.exit(main())
File "/private/tmp/terraformpy-bug/.venv/lib/python3.8/site-packages/terraformpy/cli.py", line 41, in main
imp.load_source(filename[:-6], filename)
File "/usr/local/Cellar/[email protected]/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "main.tf.py", line 19, in<module>
tags=[vpc.private],
File "/private/tmp/terraformpy-bug/.venv/lib/python3.8/site-packages/terraformpy/objects.py", line 292, in __getattr__
raise AttributeError(
AttributeError: Modules does not provide attribute interpolation through attribute access!
I am trying to use the output of a Terraform module, and inject them into resources.
However, referring to a
module
object fails with the following error:Context
Using python3 on OSX:
Repro steps
The script:
The steps:
Workaround
The workaround I am using is to manually interpolate the module reference:
But that defeats the purpose of using a python object.
The text was updated successfully, but these errors were encountered: