INNER CODE UNIT · Python

TerraformPlanModule

GoogleCloudPlatform/terraform-python-testing-helper · tftest.py:162

class TerraformPlanModule(TerraformJSONBase):
  "Minimal wrapper for parsed plan output modules."

  def __init__(self, raw):
    super(TerraformPlanModule, self).__init__(raw)
    prefix = raw.get('address', '')
    self._strip = 0 if not prefix else len(prefix) + 1
    self._modules = self._resources = None

  @property
  def child_modules(self):
    if self._modules is None:
      self._modules = dict(
          (mod['address'][self._strip:], TerraformPlanModule(mod))
          for mod in self._raw.get('child_modules', {}))
    return self._modules

  @property

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…