-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathcleanUp.ps1
35 lines (28 loc) · 837 Bytes
/
cleanUp.ps1
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
# This will start the deletion of a resource group but not wait.
[CmdletBinding()]
param (
[Parameter(
Position = 0,
HelpMessage = "The name of the resource group to be created. All resources will be place in the resource group and start with name."
)]
[string]
$rgName = "dapr_pubsub_demo",
[Parameter(
HelpMessage = "Set to the location of the resources to use."
)]
[ValidateSet("all", "azure", "aws")]
[string]
$env = "all",
[switch]
$force
)
. ../.scripts/common.ps1
if ($env -eq 'all' -or $env -eq 'azure') {
# Remove local_secrets.json
Remove-Item ./components/azure/local_secrets.json -ErrorAction SilentlyContinue
Remove-ResourceGroup -name $rgName -force:$force -nowait
}
if ($env -eq 'all' -or $env -eq 'aws') {
### AWS
Remove-AWS
}