-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_option_group_rds.sh
50 lines (37 loc) · 1.03 KB
/
create_option_group_rds.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# This is the driver script to create an AWS RDS Database Option Group
# Load Option parameters from environment file
. ./setEnv.sh
#
# Set AWS Profile
#
AWS_CMD_PROFILE=" --profile ${PROFILENAME}"
#
# AWS RDS option group create command line and options
#
CMD="aws $AWS_CMD_PROFILE rds create-option-group "
usage () {
echo "Usage: ${CMD} --engine-name <VALUE> --major-engine-version <VALUE> --description <VALUE>"
echo
echo "where VALUE is set via setEnv.sh"
echo
echo
}
# Execute usage block above when user supplies h as script paremeter
while getopts :h option
do
case $option in
"h")
usage
exit ${EXIT_STATUS}
;;
esac
done
#
# Echo AWS command to be run and then run it
#
CMD="$CMD --option-group-name $OPTIONGROUPNAME --engine-name $ENGINENAME --major-engine-version $MAJORENGINEVERSION --option-group-description $DESCRIPTION --tags Key=$TAGKEY,Value=$TAGVALUE"
echo "Command to execute:"
echo "-----------------------"
echo $CMD
$CMD