Skip to content

Commit

Permalink
Merge pull request #1715 from edx/ihassan/GSRE-997_update_rds_alarms_job
Browse files Browse the repository at this point in the history
chore: Update RDS alarms job to run for whitelisted regions
  • Loading branch information
syedimranhassan committed Dec 12, 2023
2 parents 9d8ec78 + e3946cf commit 1540f98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions devops/jobs/MissingRDSAlarms.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ class MissingRDSAlarms {
ignore_options = "${ignore_options}--ignore ${db} "
}

def whitelistregions = ""
configuration.REGION_LIST.each { include ->
whitelistregions = "${whitelistregions}-r ${include} "
}

environmentVariables {
env('AWS_DEFAULT_REGION', extraVars.get('REGION'))
env('IGNORE_OPTIONS', ignore_options)
env('WHITELISTREGIONS', whitelistregions)
}

multiscm {
Expand Down
5 changes: 4 additions & 1 deletion devops/resources/missing-rds-alarms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ set -x
if [[ ! -v IGNORE_OPTIONS ]]; then
IGNORE_OPTIONS=""
fi
if [[ ! -v WHITELISTREGIONS ]]; then
WHITELISTREGIONS=""
fi

python missing_rds_alarms.py ${IGNORE_OPTIONS}
python missing_rds_alarms.py ${IGNORE_OPTIONS} ${WHITELISTREGIONS}

0 comments on commit 1540f98

Please sign in to comment.