Skip to content

Commit

Permalink
chore(pipeline): don't wait for input to Terraform (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld authored Nov 30, 2022
2 parents 3d7db65 + 47f4d03 commit 7cf6cc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"python.testing.unittestEnabled": false,
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform"
},
"[terraform-vars]": {
"editor.defaultFormatter": "hashicorp.terraform"
}
}
6 changes: 4 additions & 2 deletions terraform/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ stages:
provider: azurerm
command: init
workingDirectory: "$(System.DefaultWorkingDirectory)/terraform"
# https://developer.hashicorp.com/terraform/tutorials/automation/automate-terraform#automated-terraform-cli-workflow
commandOptions: -input=false
# service connection
backendServiceArm: Production
# needs to match main.tf
Expand All @@ -41,7 +43,7 @@ stages:
command: plan
# wait for lock to be released, in case being used by another pipeline run
# https://discuss.hashicorp.com/t/terraform-plan-wait-for-lock-to-be-released/6870/2
commandOptions: -lock-timeout=2m
commandOptions: -input=false -lock-timeout=2m
workingDirectory: "$(System.DefaultWorkingDirectory)/terraform"
# service connection
environmentServiceNameAzureRM: Production
Expand All @@ -53,7 +55,7 @@ stages:
provider: azurerm
command: apply
# (ditto the lock comment above)
commandOptions: -lock-timeout=2m
commandOptions: -input=false -lock-timeout=2m
workingDirectory: "$(System.DefaultWorkingDirectory)/terraform"
# service connection
environmentServiceNameAzureRM: Production
Expand Down

0 comments on commit 7cf6cc2

Please sign in to comment.