Skip to content

Commit

Permalink
Added additional log entries for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
ehvs committed Dec 18, 2024
1 parent 115d6a1 commit 1844f18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/util/purge/resourcegroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (rc *ResourceCleaner) cleanNetworking(ctx context.Context, resourceGroup mg
return err
}

rc.log.Debugf("Removing security group from subnet: %s/%s/%s", *resourceGroup.Name, *networkSecGroup.Name, *subnet.Name)
rc.log.Printf("Dettaching NSG from subnet: %s/%s/%s", *resourceGroup.Name, *networkSecGroup.Name, *subnet.Name)

if !rc.dryRun {
if subnet.Properties.NetworkSecurityGroup == nil {
Expand All @@ -109,6 +109,9 @@ func (rc *ResourceCleaner) cleanNetworking(ctx context.Context, resourceGroup mg
if err != nil {
return err
}
rc.log.Printf("[DRY-RUN=False] Resources Dettaching: NSG RG: %s - NSG: %v || Subnet RG: %v vnetName.ResourceName: %s - subnetName: %s", *resourceGroup.Name, *networkSecGroup.Name, subnetRGName, vnetName.ResourceName, subnetName)
} else {
rc.log.Printf("[DRY-RUN=True] Resources Dettaching: NSG RG: %s - NSG: %v || Subnet RG: %v vnetName.ResourceName: %s - subnetName: %s", *resourceGroup.Name, *networkSecGroup.Name, subnetRGName, vnetName.ResourceName, subnetName)
}
}
}
Expand Down

0 comments on commit 1844f18

Please sign in to comment.