Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ paths:
ignore:
- 'property "random" is not defined in object type'
- 'property "acme" is not defined in object type'
.github/workflows/test-apply.yaml:
ignore:
- 'input "var" is not defined in action "terraform-apply"'
.github/workflows/test-plan.yaml:
ignore:
- 'input "var" is not defined in action "terraform-plan"'
37 changes: 8 additions & 29 deletions .github/workflows/test-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ jobs:

apply_vars:
runs-on: ubuntu-24.04
name: Apply approved changes with deprecated vars
name: Apply changes with deprecated var
permissions:
contents: read
pull-requests: write
Expand All @@ -940,43 +940,22 @@ jobs:
with:
persist-credentials: false

- name: Plan
uses: ./terraform-plan
with:
path: tests/workflows/test-apply/deprecated_var
var: my_var=hello
var_file: tests/workflows/test-apply/test.tfvars

- name: Apply
uses: ./terraform-apply
id: output
id: apply
continue-on-error: true
with:
path: tests/workflows/test-apply/deprecated_var
var: my_var=hello
var_file: tests/workflows/test-apply/test.tfvars
auto_approve: true

- name: Verify outputs
- name: Check invalid
env:
OUTPUT_STRING: ${{ steps.output.outputs.output_string }}
FROM_VAR: ${{ steps.output.outputs.from_var }}
FROM_VARFILE: ${{ steps.output.outputs.from_varfile }}
RUN_ID: ${{ steps.output.outputs.run_id }}
APPLY_OUTCOME: ${{ steps.apply.outcome }}
run: |
if [[ "$OUTPUT_STRING" != "the_string" ]]; then
echo "::error:: output s not set correctly"
exit 1
fi
if [[ "$FROM_VAR" != "this should be overridden" ]]; then
echo "::error:: output from_var not set correctly"
exit 1
fi
if [[ "$FROM_VARFILE" != "monkey" ]]; then
echo "::error:: output from_varfile not set correctly"
exit 1
fi

if [[ -n "$RUN_ID" ]]; then
echo "::error:: run_id should not be set"
if [[ "$APPLY_OUTCOME" != "failure" ]]; then
echo "Using removed var input did not fail correctly."
exit 1
fi

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,21 @@ jobs:

- name: Plan
uses: ./terraform-plan
id: plan
continue-on-error: true
with:
path: tests/workflows/test-plan/sensitive_var
var: my_sensitive_var=hello

- name: Check invalid
env:
PLAN_OUTCOME: ${{ steps.plan.outcome }}
run: |
if [[ "$PLAN_OUTCOME" != "failure" ]]; then
echo "Using removed var input did not fail correctly."
exit 1
fi

plan_change_run_commands:
runs-on: ubuntu-24.04
name: Change with shell init commands
Expand Down
3 changes: 2 additions & 1 deletion docs-gen/inputs/var.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
type='string',
description='''
Comma separated list of $ProductName vars to set.
This is deprecated due to the following limitations:
This has been removed due to the following limitations:
- Only primitive types can be set with `var` - number, bool and string.
- String values may not contain a comma.
- Values set with `var` will be overridden by values contained in `var_file`s
Expand All @@ -27,6 +27,7 @@
''',
required=False,
deprecation_message='Use the variables input instead.',
available_in=[],
#default='',
show_in_docs=False
)
Loading
Loading