INNER CODE UNIT · Python

TerraformPlanOutput

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

class TerraformPlanOutput(TerraformJSONBase):
  "Minimal wrapper for Terraform plan JSON output."

  def __init__(self, raw):
    super(TerraformPlanOutput, self).__init__(raw)
    planned_values = raw.get('planned_values', {})
    self.root_module = TerraformPlanModule(planned_values.get(
        'root_module', {}))
    self.outputs = TerraformValueDict(planned_values.get('outputs', {}))
    self.resource_changes = dict(
        (v['address'], v) for v in self._raw.get('resource_changes', {}))
    # there might be no variables defined
    self.variables = TerraformValueDict(raw.get('variables', {}))
    self.prior_root_module = TerraformPlanModule(
        raw.get('prior_state', {}).get('values', {}).get('root_module', {}))

  @property
  def resources(self):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…