Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, raw):
super(TerraformState, self).__init__(raw)
self.modules = {}
for k, v in raw.items():
if k != 'modules':
setattr(self, k, v)
continue
for mod in v:
path = '.'.join(mod['path'])
self.modules[path] = TerraformStateModule(path, mod)