Skip to content

Commit

Permalink
docs: add hashicorp/setup-terraform example
Browse files Browse the repository at this point in the history
  • Loading branch information
patheard authored Jul 1, 2021
1 parent aeb178d commit bb7ceaf
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Use the following to control the action:

# Examples
```yaml
# Setup Terraform with the `terraform_wrapper` disabled
- uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false

# Run Terraform plan and add a comment with changes on the PR
- name: Terraform plan
uses: cds-snc/terraform-plan
Expand Down Expand Up @@ -60,15 +65,9 @@ Use the following to control the action:
uses: cds-snc/terraform-plan
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
terraform-init: -backend-config="region=ca-central-1"
```
# Notes
If you use the [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) action, `terraform_wrapper` needs to be disabled:
```yaml
- uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform-init: |
-backend-config="bucket=your-state-bucket-name"
-backend-config="region=ca-central-1"
```
# Contributing
Expand Down

0 comments on commit bb7ceaf

Please sign in to comment.