Skip to content

Commit

Permalink
add docs on specifying terraform version (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Jun 6, 2024
1 parent 03e08d5 commit c699bba
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/howto/specify-terraform-version.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "Specify terraform version"
---

In order to specify which terraform version to run you can do so in the digger_workflow.yml file.

This example shows how you can do it for terraform:

```
jobs:
destroy:
runs-on: ubuntu-latest
steps:
- name: digger destroy
uses: diggerhq/digger@vLatest
with:
setup-terraform: true
terraform-version: v1.5.5
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

And similarly for openTofu:

```
jobs:
destroy:
runs-on: ubuntu-latest
steps:
- name: digger destroy
uses: diggerhq/digger@vLatest
with:
setup-opentofu: true
opentofu-version: v1.6.1
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
{
"group": "How To",
"pages": [
"howto/specify-terraform-version",
"howto/apply-on-merge",
"howto/apply-requirements",
"howto/auto-merge",
Expand Down

0 comments on commit c699bba

Please sign in to comment.