Skip to content

Commit fe2de8a

Browse files
committed
🐛 Fix relative path for file inputs
1 parent de6caf2 commit fe2de8a

File tree

11 files changed

+36
-19
lines changed

11 files changed

+36
-19
lines changed

.github/workflows/test-apply.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ jobs:
140140
141141
backend_config:
142142
runs-on: ubuntu-latest
143-
name: Apply changes that use a backend config
143+
name: backend_config & backed_config_vars
144144
env:
145145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
147+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
146148
steps:
147149
- name: Checkout
148150
uses: actions/checkout@v2
@@ -151,14 +153,14 @@ jobs:
151153
uses: ./terraform-plan
152154
with:
153155
path: tests/apply/backend_config
154-
backend_config: tests/apply/backend_config/backend_config
156+
backend_config_file: tests/apply/backend_config/backend_config
155157

156158
- name: Apply
157159
uses: ./terraform-apply
158160
id: backend_config_file
159161
with:
160162
path: tests/apply/backend_config
161-
backend_config: tests/apply/backend_config/backend_config
163+
backend_config_file: tests/apply/backend_config/backend_config
162164

163165
- name: Verify outputs
164166
run: |
@@ -202,6 +204,7 @@ jobs:
202204
path: tests/apply/vars
203205
label: TestLabel
204206
var: my_var=world
207+
var_file: tests/apply/test.tfvars
205208

206209
- name: Apply
207210
uses: ./terraform-apply
@@ -210,6 +213,7 @@ jobs:
210213
path: tests/apply/vars
211214
label: TestLabel
212215
var: my_var=world
216+
var_file: tests/apply/test.tfvars
213217

214218
- name: Verify outputs
215219
run: |

image/actions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ function relative_to() {
7272
local relpath
7373

7474
absbase="$1"
75-
relpath="$1"
76-
realpath --no-symlinks --canonicalize-missing --relative-base="$absbase" "$relpath"
75+
relpath="$2"
76+
realpath --no-symlinks --canonicalize-missing --relative-to="$absbase" "$relpath"
7777
}
7878

7979
function init() {

terraform-apply/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ the master branch:
6464

6565
* `var_file`
6666

67-
Comma separated list of terraform var files
67+
Comma separated list of tfvars files to use.
68+
Paths should be relative to the repository root.
6869

6970
- Type: string
7071
- Optional
@@ -78,7 +79,8 @@ the master branch:
7879

7980
* `backend_config_file`
8081

81-
Comma separated list of terraform backend config files.
82+
Comma separated list of terraform backend config files to use.
83+
Paths should be relative to the repository root.
8284

8385
- Type: string
8486
- Optional

terraform-check/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ This is intended to run on a schedule to notify if manual changes to your infras
3232

3333
* `var_file`
3434

35-
Comma separated list of terraform var files
35+
Comma separated list of tfvars files to use.
36+
Paths should be relative to the repository root.
3637

3738
- Type: string
3839
- Optional
@@ -46,7 +47,8 @@ This is intended to run on a schedule to notify if manual changes to your infras
4647

4748
* `backend_config_file`
4849

49-
Comma separated list of terraform backend config files.
50+
Comma separated list of terraform backend config files to use.
51+
Paths should be relative to the repository root.
5052

5153
- Type: string
5254
- Optional

terraform-destroy-workspace/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ This action uses the `terraform destroy` command to destroy all resources in a t
2929

3030
* `var_file`
3131

32-
Comma separated list of terraform var files
32+
Comma separated list of tfvars files to use.
33+
Paths should be relative to the repository root.
3334

3435
- Type: string
3536
- Optional
@@ -43,7 +44,8 @@ This action uses the `terraform destroy` command to destroy all resources in a t
4344

4445
* `backend_config_file`
4546

46-
Comma separated list of terraform backend config files.
47+
Comma separated list of terraform backend config files to use.
48+
Paths should be relative to the repository root.
4749

4850
- Type: string
4951
- Optional

terraform-destroy/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ This action uses the `terraform destroy` command to destroy all resources in a t
3131

3232
* `var_file`
3333

34-
Comma separated list of terraform var files
34+
Comma separated list of tfvars files to use.
35+
Paths should be relative to the repository root.
3536

3637
- Type: string
3738
- Optional
@@ -45,7 +46,8 @@ This action uses the `terraform destroy` command to destroy all resources in a t
4546

4647
* `backend_config_file`
4748

48-
Comma separated list of terraform backend config files.
49+
Comma separated list of terraform backend config files to use.
50+
Paths should be relative to the repository root.
4951

5052
- Type: string
5153
- Optional

terraform-new-workspace/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Creates a new terraform workspace. If the workspace already exists, succeeds wit
2929

3030
* `backend_config_file`
3131

32-
Comma separated list of terraform backend config files.
32+
Comma separated list of terraform backend config files to use.
33+
Paths should be relative to the repository root.
3334

3435
- Type: string
3536
- Optional

terraform-output/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Retrieve the root-level outputs from a terraform configuration.
3030

3131
* `backend_config_file`
3232

33-
Comma separated list of terraform backend config files.
33+
Comma separated list of terraform backend config files to use.
34+
Paths should be relative to the repository root.
3435

3536
- Type: string
3637
- Optional

terraform-plan/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
5050

5151
* `var_file`
5252

53-
Comma separated list of terraform var files
53+
Comma separated list of tfvars files to use.
54+
Paths should be relative to the repository root.
5455

5556
- Type: string
5657
- Optional
@@ -64,7 +65,8 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
6465

6566
* `backend_config_file`
6667

67-
Comma separated list of terraform backend config files.
68+
Comma separated list of terraform backend config files to use.
69+
Paths should be relative to the repository root.
6870

6971
- Type: string
7072
- Optional

terraform-remote-state/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Retrieves the root-level outputs from a terraform remote state.
3030

3131
* `backend_config_file`
3232

33-
Comma separated list of terraform backend config files.
33+
Comma separated list of terraform backend config files to use.
34+
Paths should be relative to the repository root.
3435

3536
- Type: string
3637
- Optional

0 commit comments

Comments
 (0)