From 94e0aaa08348d6c9eb705f7d1d596ecc47fda8c6 Mon Sep 17 00:00:00 2001 From: Emre Erkunt Date: Fri, 25 Jun 2021 15:38:25 +0100 Subject: [PATCH] Support for the new plan output format (#513) * Added functional tests for multi-module referencing * Added more resources to the test * Added support for processing modules recursively for multi-layer module structures * Fixed a problem where some of the variables were spilling on other functions :facepalm: * Optimised the code a bit * Added comments for some of the methods * Fixed the recursive function where we were referencing instead of copying data. * Also updated the functional test about this * Added 0.2 format_version support on JSON plans. * Updated requirements_dev * Fixed a typo in requirements_dev --- CHANGELOG.md | 3 +++ terraform_compliance/extensions/terraform.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661d4926..3c4f822a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 1.3.19 (2020-06-25) +* Added new format support for terraform 1.0.1+ versions. + ## 1.3.18 (2020-06-09) * Fixed a problem where `terraform-compliance` fails to recognise some resources on a 2+ multi-layered module structure. diff --git a/terraform_compliance/extensions/terraform.py b/terraform_compliance/extensions/terraform.py index fef84386..8b0aef50 100644 --- a/terraform_compliance/extensions/terraform.py +++ b/terraform_compliance/extensions/terraform.py @@ -27,7 +27,10 @@ def __init__(self, filename, parse_it=True): '0.15.', '1.0.', ) - self.supported_format_versions = ['0.1'] + self.supported_format_versions = [ + '0.1', + '0.2' + ] self.raw = self._read_file(filename) self.variables = None