Created
May 31, 2022 10:37
-
-
Save carljavier/61e96aa7e012d5860c81a6a7a5f8484d to your computer and use it in GitHub Desktop.
Azure DevOps TF Pipeline
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
trigger: | |
- master | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- script: echo Starting Terraform Run | |
- task: TerraformInstaller@0 | |
inputs: | |
terraformVersion: 'latest' | |
displayName: 'Starting Terraform' | |
- task: TerraformCLI@0 | |
name: TF_Version | |
inputs: | |
command: 'version' | |
allowTelemetryCollection: true | |
- task: TerraformCLI@0 | |
name: TF_fmt | |
inputs: | |
command: 'fmt' | |
commandOptions: '-check' | |
allowTelemetryCollection: true | |
- task: TerraformCLI@0 | |
name: TF_init | |
env: | |
TF_TOKEN_app_terraform_io: $(TF_TOKEN_APP_TERRAFORM_IO) | |
inputs: | |
command: 'init' | |
backendType: 'selfConfigured' | |
allowTelemetryCollection: true | |
- task: TerraformCLI@0 | |
name: TF_validate | |
env: | |
TF_TOKEN_app_terraform_io: $(TF_TOKEN_APP_TERRAFORM_IO) | |
inputs: | |
command: 'validate' | |
allowTelemetryCollection: true | |
- task: TerraformCLI@0 | |
name: TF_plan | |
env: | |
TF_TOKEN_app_terraform_io: $(TF_TOKEN_APP_TERRAFORM_IO) | |
inputs: | |
command: 'plan' | |
allowTelemetryCollection: true | |
- task: TerraformCLI@0 | |
name: TF_apply | |
env: | |
TF_TOKEN_app_terraform_io: $(TF_TOKEN_APP_TERRAFORM_IO) | |
inputs: | |
command: 'apply' | |
allowTelemetryCollection: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment