1
1
trigger :
2
- - main
2
+ - master
3
3
4
4
pool :
5
5
vmImage : ' ubuntu-latest'
@@ -103,3 +103,53 @@ stages:
103
103
environmentServiceName : ' terraform-aks-azurerm-svc-con'
104
104
commandOptions : ' $(Pipeline.Workspace)/terraform-manifests-out/$(DEV_ENVIRONMENT)-$(Build.BuildId).out'
105
105
allowTelemetryCollection : false
106
+
107
+ # Stage-2: Deploy Stages for Dev & QA
108
+ # Deployment-2: Deploy QA AKS Cluster
109
+ # # Step-1: Download Secure File
110
+ # # Step-2: Terraform Initialize (State Storage to store in Azure Storage Account)
111
+ # # Step-3: Terraform Plan
112
+ # # Step-4: Terraform Apply
113
+
114
+ - deployment : DeployQAAKSCluster
115
+ displayName : DeployQAAKSCluster
116
+ pool :
117
+ vmImage : ' ubuntu-latest'
118
+ environment : $(QA_ENVIRONMENT)
119
+ strategy :
120
+ runOnce :
121
+ deploy :
122
+ steps :
123
+ - task : DownloadSecureFile@1
124
+ displayName : Download SSH Key
125
+ name : sshkey
126
+ inputs :
127
+ secureFile : ' aks-terraform-devops-ssh-key-ububtu.pub'
128
+ - task : TerraformCLI@0
129
+ displayName : Terraform Init
130
+ inputs :
131
+ command : ' init'
132
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
133
+ backendType : ' azurerm'
134
+ backendServiceArm : ' terraform-aks-azurerm-svc-con'
135
+ backendAzureRmResourceGroupName : ' terraform-storage-rg'
136
+ backendAzureRmStorageAccountName : ' terraformstatexlrwdrzs'
137
+ backendAzureRmContainerName : ' tfstatefiles'
138
+ backendAzureRmKey : ' aks-$(QA_ENVIRONMENT).tfstate'
139
+ allowTelemetryCollection : false
140
+ - task : TerraformCLI@0
141
+ displayName : Terraform Plan
142
+ inputs :
143
+ command : ' plan'
144
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
145
+ environmentServiceName : ' terraform-aks-azurerm-svc-con'
146
+ commandOptions : ' -var ssh_public_key=$(sshkey.secureFilePath) -var environment=$(QA_ENVIRONMENT) -out $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
147
+ allowTelemetryCollection : false
148
+ - task : TerraformCLI@0
149
+ displayName : Terraform Apply
150
+ inputs :
151
+ command : ' apply'
152
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
153
+ environmentServiceName : ' terraform-aks-azurerm-svc-con'
154
+ commandOptions : ' $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
155
+ allowTelemetryCollection : false
0 commit comments