-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
73 lines (61 loc) · 2.87 KB
/
azure-pipelines.yml
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
63
64
65
66
67
68
69
70
71
72
73
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: infra_prep
displayName: "Intrastructure Prep"
jobs:
- job: terraform_deploy
displayName: "Terraform Deployment"
steps:
- task: TerraformInstaller@0
displayName: "Install Terraform"
inputs:
terraformVersion: 'latest'
- task: TerraformCLI@0
displayName: "Terraform Init"
inputs:
command: 'init'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/infra-prep'
commandOptions: '-backend-config="client_id=$(az_client_id)" -backend-config="client_secret=$(az_client_secret)" -backend-config="subscription_id=$(az_subscription_id)" -backend-config="tenant_id=$(az_tenant_id)"'
- task: TerraformCLI@0
displayName: "Terraform Plan - infra"
inputs:
command: 'plan'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/infra-prep'
environmentServiceName: 'HBL-MS-AIRS(ce934b07-c047-4954-bfbc-b528d97c2c70)'
allowTelemetryCollection: false
commandOptions: '-var="vm-admin-password=$(vmadmin)" -var="adds-join-password=$(adds_pass)" -var="adds-join-username=$(adds_username)"'
- task: TerraformCLI@0
displayName: "Terraform Apply - Infra"
inputs:
command: 'apply'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/infra-prep'
environmentServiceName: 'HBL-MS-AIRS(ce934b07-c047-4954-bfbc-b528d97c2c70)'
commandOptions: '-var="vm-admin-password=$(vmadmin)" -var="adds-join-password=$(adds_pass)" -var="adds-join-username=$(adds_username)"'
- stage: wvd_deploy
displayName: "Deploy WVD"
jobs:
- job: wvd_deploy
displayName: "WVD Terraform Deployment"
steps:
- task: TerraformCLI@0
displayName: "Terraform Init"
inputs:
command: 'init'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/wvd-deploy'
commandOptions: '-upgrade -backend-config="client_id=$(az_client_id)" -backend-config="client_secret=$(az_client_secret)" -backend-config="subscription_id=$(az_subscription_id)" -backend-config="tenant_id=$(az_tenant_id)"'
- task: TerraformCLI@0
displayName: "Terraform Plan - wvd"
inputs:
command: 'plan'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/wvd-deploy'
environmentServiceName: 'HBL-MS-AIRS(ce934b07-c047-4954-bfbc-b528d97c2c70)'
allowTelemetryCollection: false
- task: TerraformCLI@0
displayName: "Terraform Apply - wvd"
inputs:
command: 'apply'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform-template/wvd-deploy'
environmentServiceName: 'HBL-MS-AIRS(ce934b07-c047-4954-bfbc-b528d97c2c70)'