Skip to content

Commit

Permalink
autoback messages
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie-knight committed Oct 31, 2023
1 parent 7634534 commit ea9dce3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions strikes/AutomatedBackups.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package strikes

import (
"context"
"fmt"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/rds"
Expand Down Expand Up @@ -45,14 +46,14 @@ func (a *Strikes) AutomatedBackups() (strikeName string, result raidengine.Strik
}

result.Passed = true
result.Message = "Completed Successfully"
result.Message = "Automated Backups are enabled"
return
}

func checkRDSAutomatedBackupMovement(cfg aws.Config) (result raidengine.MovementResult) {

result = raidengine.MovementResult{
Description: "Check if the instance has automated backups enabled",
Description: "Check whether the instance has automated backups enabled",
Function: utils.CallerPath(0),
}

Expand All @@ -71,6 +72,8 @@ func checkRDSAutomatedBackupMovement(cfg aws.Config) (result raidengine.Movement
}

// Loop through the instances and print information
result.Passed = len(backups.DBInstanceAutomatedBackups) > 0
backupCount := len(backups.DBInstanceAutomatedBackups)
result.Message = fmt.Sprintf("%d Automated backups found", backupCount)
result.Passed = backupCount > 0
return
}

0 comments on commit ea9dce3

Please sign in to comment.