-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05-azure-kubernets-cluster-iaac-pipeline.yml
35 lines (30 loc) · 1.25 KB
/
05-azure-kubernets-cluster-iaac-pipeline.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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo K8S Terraform Azure!
displayName: 'Run a one-line script'
- task: DownloadSecureFile@1
name: publicKey
inputs:
secureFile: 'azure_rsa.pub'
- task: TerraformCLI@0
inputs:
command: 'init'
workingDirectory: '$(System.DefaultWorkingDirectory)/configuration/iaac/azure/kubernetes'
# commandOptions: '-var client_id=$(client_id) -var client_secret=$(client_secret) -var ssh_public_key=$(publicKey.secureFilePath)'
backendType: 'azurerm'
backendServiceArm: 'azure-resource-manager-service-connection'
ensureBackend: true
backendAzureRmResourceGroupName: 'terraform-backend-resource-group'
backendAzureRmResourceGroupLocation: 'westeurope'
backendAzureRmStorageAccountName: 'storageaccountjsp123'
backendAzureRmContainerName: 'storageaccountjsparmanicontainer'
backendAzureRmKey: 'kubernetes-dev.tfstate'
- task: TerraformCLI@0
inputs:
command: 'apply'
workingDirectory: '$(System.DefaultWorkingDirectory)/configuration/iaac/azure/kubernetes'
environmentServiceName: 'azure-resource-manager-service-connection'
commandOptions: '-var client_id=$(client_id) -var client_secret=$(client_secret) -var ssh_public_key=$(publicKey.secureFilePath)'