Skip to content

Commit

Permalink
Update terrafrom handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashS0510 committed Feb 11, 2025
1 parent cee36ba commit e05dd6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/tirith/providers/terraform_plan/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def direct_dependencies_operator(input_data: dict, provider_inputs: dict, output

for resource in config_resources:

if resource_type != "*" and resource.get("type") != resource_type:
if resource.get("type") != resource_type:
continue
is_resource_found = True
deps_resource_type = {resource_id.split(".")[0] for resource_id in resource.get("depends_on", [])}
Expand Down Expand Up @@ -318,7 +318,7 @@ def direct_references_operator_referenced_by(input_data: dict, provider_inputs:

# Loop for adding reference_target
for resource_change in resource_changes:
if (not resource_type in (resource_change["type"], "*")) or resource_change.get("change", {}).get(
if (not resource_type in (resource_change["type"])) or resource_change.get("change", {}).get(
"actions"
) == ["destroy"]:
continue
Expand Down Expand Up @@ -408,7 +408,7 @@ def direct_references_operator_references_to(input_data: dict, provider_inputs:

for resource_change in resource_changes:

if (resource_type != "*" and resource_change.get("type") != resource_type) or resource_change.get(
if ( resource_change.get("type") != resource_type) or resource_change.get(
"change", {}
).get("actions") == ["destroy"]:
continue
Expand Down Expand Up @@ -482,7 +482,7 @@ def direct_references_operator(input_data: dict, provider_inputs: dict, outputs:

for resource in config_resources:

if not resource_type in (resource.get("type"), "*"):
if not resource_type in (resource.get("type")):
continue
is_resource_found = True
resource_references = set()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"required_provider": "stackguardian/terraform_plan",
"version": "v1"
},
"eval_expression": "eval-id-1 || eval-id-2"
"eval_expression": "eval-id-1 "
}

0 comments on commit e05dd6d

Please sign in to comment.