diff --git a/iambic/plugins/v0_1_0/aws/models.py b/iambic/plugins/v0_1_0/aws/models.py index 97bc980d3..b820eb91a 100644 --- a/iambic/plugins/v0_1_0/aws/models.py +++ b/iambic/plugins/v0_1_0/aws/models.py @@ -479,6 +479,17 @@ def dict( exclude_defaults=exclude_defaults, exclude_none=exclude_none, ) + + if "variables" in resp: + resp["variables"] = [ + i + for i in resp.get("variables", []) + if i.get("key") not in ["account_id", "account_name"] + ] + + if resp["variables"] == []: + resp.pop("variables") + return sort_dict( resp, [