-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-deployment.yaml
58 lines (51 loc) · 1.94 KB
/
azure-deployment.yaml
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
trigger:
- none
pool:
vmImage: 'windows-latest'
stages:
- stage: deploy
displayName: deploy
jobs:
- deployment: Deploy
displayName: Deploy Basic Terraform Infrastructure
environment: Dev
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: TerraformInstaller@0
displayName: Installing Terraform
inputs:
terraformVersion: 'latest'
- task: TerraformTaskV3@3
displayName: Init Terraform
inputs:
provider: 'azurerm'
command: 'init'
backendServiceArm: 'SC-DEV'
workingDirectory: 'Terraform'
backendAzureRmResourceGroupName: 'Devops-RG'
backendAzureRmStorageAccountName: 'devopstrainingstorage'
backendAzureRmContainerName: 'kunal-container'
backendAzureRmKey: 'terraform.tfstate'
- task: TerraformTaskV3@3
displayName: Plan Terraform
inputs:
provider: 'azurerm'
command: 'plan'
workingDirectory: 'Terraform'
environmentServiceNameAzureRM: 'SC-DEV'
- task: TerraformTaskV3@3
displayName: Apply Terraform
inputs:
provider: 'azurerm'
command: 'apply'
workingDirectory: 'Terraform'
environmentServiceNameAzureRM: 'SC-DEV'
# - task: TerraformTaskV3@3
# inputs:
# provider: 'azurerm'
# command: 'destroy'
# workingDirectory: 'Terraform'
# environmentServiceNameAzureRM: 'SC-DEV'