Last active
June 6, 2020 20:49
-
-
Save rudolphjacksonm/1f1bc63ad0f9badbb57e62b184318ac4 to your computer and use it in GitHub Desktop.
azdevops-terraform-apply
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- task: Cache@2 | |
displayName: 'Get Cache for TF Artifact' | |
inputs: | |
key: terraform | $(Agent.OS) | "$(Build.BuildNumber)" | $(Build.SourceVersion) | $(tfComponent) | "$(tfVarFileName)" | |
path: $(tfExecutionDir) | |
- task: TerraformInstaller@0 | |
displayName: 'Install Terraform' | |
inputs: | |
terraformVersion: '$(terraformVersion)' | |
- task: TerraformTaskV1@0 | |
displayName: 'Terraform Apply' | |
inputs: | |
provider: 'azurerm' | |
command: 'apply' | |
commandOptions: '${BUILD_BUILDNUMBER}.tfplan' # pass plan file to terraform apply | |
workingDirectory: '$(tfExecutionDir)' | |
environmentServiceNameAzureRM: '$(serviceConnectionName)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment