mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-27 13:33:37 +00:00
Make examples non-blocking
The README.md examples contain steps that are blocking due to terraform asking for input. Due to stdin and stderr captured, it can be hard to debug what is going wrong. The -input=false parameter to the terraform init, terraform plan and terraform apply calls will produce an error when required input is not given.
This commit is contained in:
parent
f0e69a3f87
commit
97234b12c6
1 changed files with 4 additions and 4 deletions
|
|
@ -68,10 +68,10 @@ Subsequent steps can access outputs when the wrapper script is installed.
|
||||||
steps:
|
steps:
|
||||||
- uses: hashicorp/setup-terraform@v1
|
- uses: hashicorp/setup-terraform@v1
|
||||||
|
|
||||||
- run: terraform init
|
- run: terraform init -input=false
|
||||||
|
|
||||||
- id: plan
|
- id: plan
|
||||||
run: terraform plan -no-color
|
run: terraform plan -no-color -input=false
|
||||||
|
|
||||||
- run: echo ${{ steps.plan.outputs.stdout }}
|
- run: echo ${{ steps.plan.outputs.stdout }}
|
||||||
- run: echo ${{ steps.plan.outputs.stderr }}
|
- run: echo ${{ steps.plan.outputs.stderr }}
|
||||||
|
|
@ -95,7 +95,7 @@ steps:
|
||||||
|
|
||||||
- name: Terraform Init
|
- name: Terraform Init
|
||||||
id: init
|
id: init
|
||||||
run: terraform init
|
run: terraform init -input=false
|
||||||
|
|
||||||
- name: Terraform Validate
|
- name: Terraform Validate
|
||||||
id: validate
|
id: validate
|
||||||
|
|
@ -103,7 +103,7 @@ steps:
|
||||||
|
|
||||||
- name: Terraform Plan
|
- name: Terraform Plan
|
||||||
id: plan
|
id: plan
|
||||||
run: terraform plan -no-color
|
run: terraform plan -no-color -input=false
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- uses: actions/github-script@0.9.0
|
- uses: actions/github-script@0.9.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue