Open scott-dunt opened 3 years ago
Hello @scott-dunt ! Could this either be a duplicate or a solution for https://github.com/duo-labs/cloudmapper/issues/869 or https://github.com/duo-labs/cloudmapper/issues/845 ?
I can't find the commit you posted, does it belong to your fork?
Cheers!
I didn't commit any code, just documenting that its possible to get this working if you make a few edits
slightly different stack trace (I did fix this..)
python cloudmapper.py prepare --account XXXXX
Building data for account XXXXX
prepare(account, config, outputfilter) File "/home/sdunt/Programs/cloudmapper/commands/prepare.py", line 662, in prepare
cytoscape_json = build_data_structure(account, config, outputfilter) File "/home/sdunt/Programs/cloudmapper/commands/prepare.py", line 552, in build_data_structure
for c, reasons in get_connections(cidrs, vpc, outputfilter).items(): File "/home/sdunt/Programs/cloudmapper/commands/prepare.py", line 224, in get_connections
for sg in instance.security_groups: File "/home/sdunt/Programs/cloudmapper/shared/nodes.py", line 574, in security_groups
return pyjq.all(".Groups[].GroupId", self._json_blob) File "/home/sdunt/Programs/cloudmapper/venv/lib/python3.8/site-packages/pyjq.py", line 49, in all
return compile(script, vars, library_paths).all(_get_value(value, url, opener))
File "_pyjq.pyx", line 209, in _pyjq.Script.all (_pyjq.c:2561) _pyjq.ScriptRuntimeError: Cannot iterate over null (null)
Running CloudMapper 2.9.1
already patched the requirements.txt for package version conflicts: https://github.com/duo-labs/cloudmapper/pull/876/commits/b5b31ca15077949ade909112e0a6de3b787d2a6b
added the '?' in node.py line 498: ".DBSubnetGroup.Subnets[]?.SubnetIdentifier", self._json_blob
To correct this error, I also had to add "?" to node.py line 574: return pyjq.all(".Groups[]?.GroupId", self._json_blob)
After that it works.