Skip to content

Commit e6526fb

Browse files
committed
Added destroy.sh script
As part of the tear-down; added destroy.sh script.
1 parent 14cf648 commit e6526fb

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
-1.85 KB
Loading
38.3 KB
Loading

mtdrworkshop/teardown/destroy.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
## MyToDoReact version 1.0.
3+
##
4+
## Copyright (c) 2021 Oracle, Inc.
5+
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
6+
7+
echo ________________________________________
8+
echo Deletting resources
9+
echo ________________________________________
10+
11+
export WORKINGDIR=workingdir
12+
echo WORKINGDIR = $WORKINGDIR
13+
14+
export MTDRWORKSHOP_COMPARTMENT_ID=$(cat $WORKINGDIR/mtdrworkshopcompartmentid.txt)
15+
export MTDRDB_OCID=$(cat $WORKINGDIR/mtdrworkshopdbid.txt)
16+
export DOCKER_REGISTRY=$(cat $WORKINGDIR/mtdrworkshopdockerregistry.txt)
17+
export MTDRGTW_OCID=$(cat $WORKINGDIR/mtdrworkshopgatewayid.txt)
18+
export MTDRWORKSHOP_OKE_CLUSTER=$(cat $WORKINGDIR/mtdrworkshopclusterid.txt)
19+
20+
21+
echo Deleting ADB $MTDRDB ...
22+
oci db autonomous-database delete --autonomous-database-id $MTDRDB_OCID --force
23+
24+
echo Deleting the OKE cluster ...
25+
oci ce cluster delete --cluster-id $MTDRWORKSHOP_OKE_CLUSTER --force
26+
27+
echo Deleting API-gateway ...
28+
oci api-gateway gateway delete --gateway-id $MTDRGTW_OCID --force
29+
30+
echo Deleting Bucket ...
31+
oci os bucket delete --bucket-name mtdrworkshop --force
32+
33+
echo Deleting Repository ...
34+
oci artifacts container repository delete --repository-id $DOCKER_REGISTRY

0 commit comments

Comments
 (0)