Skip to content

Commit

Permalink
updated terrafrom handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashS0510 committed Feb 11, 2025
1 parent 12b3f2e commit 88ee43a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tirith/providers/terraform_plan/handler.py
Original file line number Diff line number Diff line change
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("actions") == [
if resource_change.get("type") != resource_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_change.get("type") != resource_type) or resource_change.get("change", {}).get("actions") == [
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 resource.get("type") != resource_type:
continue
is_resource_found = True
resource_references = set()
Expand Down

0 comments on commit 88ee43a

Please sign in to comment.