-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathremove.sh
executable file
·42 lines (35 loc) · 1.18 KB
/
remove.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
#!/bin/bash
######################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# SPDX-License-Identifier: MIT-0 #
######################################################################
print_help() {
echo ""
echo "Usage: $0 [runtime]"
echo ""
echo " runtime - optional [docker|kubernetes}. Target runtime to remove."
echo " if not specified, reads value from ./config.properties"
echo ""
echo " When runtime is kubernetes, this script uses CloudFormation to delete all stacks created by this project's provision script"
echo ""
echo " When runtime is docker, this script does not remove any resources."
echo ""
}
runtime=$1
if [ "$runtime" == "" ]; then
source ./config.properties
fi
if [ "$runtime" == "kubernetes" ]; then
echo ""
echo "Removing EKS cluster and Management instance infrastructure ..."
echo ""
pushd ./6-remove
./stack-delete.sh
popd
elif [ "$runtime" == "docker" ]; then
echo ""
echo "No additional project asset cleanup is required for runtime: $runtime..."
echo ""
else
print_help
fi