Skip to content

Commit 94a9e00

Browse files
Fix drift check logic for no chnages (#1843)
1 parent ac2fcb2 commit 94a9e00

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/iac_utils/terraform.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ func (tu TerraformUtils) GetSummaryFromPlanJson(planJson string) (bool, *IacSumm
3939
}
4040
}
4141

42-
if tfplan.OutputChanges != nil {
43-
isPlanEmpty = false
42+
for _, change := range tfplan.OutputChanges {
43+
if len(change.Actions) != 1 || change.Actions[0] != "no-op" {
44+
isPlanEmpty = false
45+
break
46+
}
4447
}
4548

4649
planSummary := IacSummary{}

0 commit comments

Comments
 (0)