Skip to content

Instantly share code, notes, and snippets.

@kunduso
Created March 25, 2021 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunduso/7c71cb963a4804ad9248e8880bf1651e to your computer and use it in GitHub Desktop.
Save kunduso/7c71cb963a4804ad9248e8880bf1651e to your computer and use it in GitHub Desktop.
Terraform plan command using powershell in Azure Pipelines
- powershell: |
terraform plan -var client_id="$(client_id)" -var client_secret="$(client_secret)" -var subscription_id="$(subscription_id)" -var tenant_id="$(tenant_id)" -out application.tfplan -no-color
workingDirectory: $(build.sourcesdirectory)
displayName: 'terraform plan'
# where $(client_id) is the appID of the service principal,
# $(client_secret) is the password of the service princial,
# $(subscription_id) is the Azure subscription to which the service principal belongs, and
# $(tenant_id) is the tenant value of the service principal.
# These values can be stored in Azure pipeline variables or as a variable group in the Azure DevOps project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment