@@ -141,4 +141,55 @@ stages:
141
141
command : ' apply'
142
142
workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
143
143
commandOptions : ' $(Pipeline.Workspace)/terraform-manifests-out/$(DEV_ENVIRONMENT)-$(Build.BuildId).out'
144
- environmentServiceNameAzureRM : ' terraform-aks-azurerm-szc-con'
144
+ environmentServiceNameAzureRM : ' terraform-aks-azurerm-szc-con'
145
+
146
+
147
+ # Deployment-2: Deploy QA AKS Cluster
148
+ # # Step-1: Download Secure File
149
+ # # Step-2: Terraform Initialize (State Storage to store in Azure Storage Account)
150
+ # # Step-3: Terraform Plan
151
+ # # Step-4: Terraform Apply
152
+
153
+ - deployment : DeployQAAKSCluster
154
+ displayName : DeployQAAKSCluster
155
+ pool :
156
+ name : ' AppPool'
157
+ environment : $(QA_ENVIRONMENT)
158
+ strategy :
159
+ runOnce :
160
+ deploy :
161
+ steps :
162
+
163
+ - task : DownloadSecureFile@1
164
+ displayName : Download SSH Key
165
+ name : sshkey
166
+ inputs :
167
+ secureFile : ' aks-terraform-devops-ssh-key-ubuntu.pub'
168
+ - task : TerraformTaskV4@4
169
+ displayName : Terraform init
170
+ inputs :
171
+ provider : ' azurerm'
172
+ command : ' init'
173
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
174
+ commandOptions : ' -reconfigure -upgrade'
175
+ backendServiceArm : ' terraform-aks-azurerm-szc-con'
176
+ backendAzureRmResourceGroupName : ' RG_AKS_project'
177
+ backendAzureRmStorageAccountName : ' stracctaksproject'
178
+ backendAzureRmContainerName : ' strgterraform'
179
+ backendAzureRmKey : ' aks-$(QA_ENVIRONMENT).tfstate'
180
+ - task : TerraformTaskV4@4
181
+ displayName : Terraform Plan
182
+ inputs :
183
+ provider : ' azurerm'
184
+ command : ' plan'
185
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
186
+ commandOptions : ' -var ssh_public_key=$(sshkey.secureFilePath) -var environment=$(QA_ENVIRONMENT) -out $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
187
+ environmentServiceNameAzureRM : ' terraform-aks-azurerm-szc-con'
188
+ - task : TerraformTaskV4@4
189
+ displayName : Terraform Apply
190
+ inputs :
191
+ provider : ' azurerm'
192
+ command : ' apply'
193
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
194
+ commandOptions : ' $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
195
+ environmentServiceNameAzureRM : ' terraform-aks-azurerm-szc-con'
0 commit comments