1
1
trigger :
2
- - main
2
+ - master
3
3
4
4
pool :
5
5
vmImage : ' ubuntu-latest'
@@ -103,3 +103,54 @@ 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
+ dependsOn : DeployDevAKSCluster
116
+ displayName : DeployQAAKSCluster
117
+ pool :
118
+ vmImage : ' ubuntu-latest'
119
+ environment : $(QA_ENVIRONMENT)
120
+ strategy :
121
+ runOnce :
122
+ deploy :
123
+ steps :
124
+ - task : DownloadSecureFile@1
125
+ displayName : Download SSH Key
126
+ name : sshkey
127
+ inputs :
128
+ secureFile : ' aks-terraform-devops-ssh-key-ububtu.pub'
129
+ - task : TerraformCLI@0
130
+ displayName : Terraform Init
131
+ inputs :
132
+ command : ' init'
133
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
134
+ backendType : ' azurerm'
135
+ backendServiceArm : ' terraform-aks-azurerm-svc-con'
136
+ backendAzureRmResourceGroupName : ' terraform-storage-rg'
137
+ backendAzureRmStorageAccountName : ' terraformstatexlrwdrzs'
138
+ backendAzureRmContainerName : ' tfstatefiles'
139
+ backendAzureRmKey : ' aks-$(QA_ENVIRONMENT).tfstate'
140
+ allowTelemetryCollection : false
141
+ - task : TerraformCLI@0
142
+ displayName : Terraform Plan
143
+ inputs :
144
+ command : ' plan'
145
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
146
+ environmentServiceName : ' terraform-aks-azurerm-svc-con'
147
+ commandOptions : ' -var ssh_public_key=$(sshkey.secureFilePath) -var environment=$(QA_ENVIRONMENT) -out $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
148
+ allowTelemetryCollection : false
149
+ - task : TerraformCLI@0
150
+ displayName : Terraform Apply
151
+ inputs :
152
+ command : ' apply'
153
+ workingDirectory : ' $(Pipeline.Workspace)/terraform-manifests-out'
154
+ environmentServiceName : ' terraform-aks-azurerm-svc-con'
155
+ commandOptions : ' $(Pipeline.Workspace)/terraform-manifests-out/$(QA_ENVIRONMENT)-$(Build.BuildId).out'
156
+ allowTelemetryCollection : false
0 commit comments