-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.ps1
62 lines (41 loc) · 1.61 KB
/
deploy.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
break
# Login to whatever cloud you want to deploy to.
Connect-AzAccount
# If you have more than one subscription make sure you deploy to the correct one
Get-AzSubscription
Set-AzContext -Subscription '0dc9caa0-28f1-48cb-a7b6-e390f6212b39'
# Deploy Basic MLS located here: aka.ms/missionlz
$name = "Basic-MLZ"
$location = 'eastus'
$templateFile = 'mlz.bicep'
$resourcePrefix = "MyMLZ"
New-AzSubscriptionDeployment -Name $name -Location $location -TemplateFile $templateFile -resourcePrefix $resourcePrefix -Verbose
# Deploy above with Defedner and Sentinel
# - Azure Firewall standard SKU
# - Sentinel deployed to the Log Analytics Workspace
# - Defender for Cloud Enabled
$name = "Sentinel-MLZ"
$location = 'eastus'
$templateFile = 'mlz.bicep'
$resourcePrefix = "MyMLZ"
$deployDefender = $true
$deploySentinel = $true
$deployRemoteAccess = $true
New-AzSubscriptionDeployment -Name $name `
-Location $location `
-TemplateFile $templateFile `
-resourcePrefix $resourcePrefix `
-deployDefender $deployDefender `
-deploySentinel $deploySentinel `
-deployRemoteAccess $deployRemoteAccess `
-Verbose
# Get all Resource Groups after MLZ deployment
Get-AzResourceGroup | Select-Object -Property ResourceGroupName
# Deploy VM to MLZ
$vmTemplateFile = 'main.bicep'
$adDeploymentName = 'Deploy-T3-Client'
$resourceGroupName = 'mymlz-rg-tier3-mlz'
New-AzResourceGroupDeployment -TemplateFile $vmTemplateFile -Name $adDeploymentName -ResourceGroupName $resourceGroupName -Verbose
# Cleanup after deployment
$filter = 'mymlz-rg'
Get-AzResourceGroup | Where-Object ResourceGroupName -match $filter | Remove-AzResourceGroup -Force -verbose