-
Notifications
You must be signed in to change notification settings - Fork 11
Lab 10: Auto Approval For Terraform Apply
himanshumudgal08 edited this page Jun 15, 2022
·
2 revisions
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
displayName: 'Install Terraform 1.1.8'
inputs:
terraformVersion: 1.1.8
It will fetch the information from remote state file stored in Blob Storage. We also need an Active Azure Subscription Id for this step.
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV2@2
displayName: 'Terraform : INIT'
inputs:
workingDirectory: '$(System.DefaultWorkingDirectory)/_IAC-CI/release'
backendServiceArm: 'Opstree-PoCs (4c9****************3c)'
backendAzureRmResourceGroupName: 'ADOagent_rg'
backendAzureRmStorageAccountName: ter*********ort
backendAzureRmContainerName: statefile
backendAzureRmKey: terraform.tfstate
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV2@2
displayName: 'Terraform : APPLY'
inputs:
command: apply
workingDirectory: '$(System.DefaultWorkingDirectory)/_IAC-CI/release'
commandOptions: '-auto-approve'
environmentServiceNameAzureRM: 'Opstree-PoCs (4c93****************3c)'