Skip to content

chore: add dependabot configuration #10

chore: add dependabot configuration

chore: add dependabot configuration #10

Workflow file for this run

name: Test terraform-output
on: [pull_request]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
terraform-output:
runs-on: ubuntu-latest
name: verify outputs
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get outputs
uses: ./terraform-output
id: terraform-output
with:
path: tests/remote-state/test-bucket_12
- name: Print the outputs
run: |
echo "my_number = ${{ steps.terraform-output.outputs.my_number }}"
echo "my_sensitive_number = ${{ steps.terraform-output.outputs.my_sensitive_number }}"
echo "my_string = ${{ steps.terraform-output.outputs.my_string }}"
echo "my_sensitive_string = ${{ steps.terraform-output.outputs.my_sensitive_string }}"
echo "my_bool = ${{ steps.terraform-output.outputs.my_bool }}"
echo "my_sensitive_bool = ${{ steps.terraform-output.outputs.my_sensitive_bool }}"
- name: Verify outputs
env:
AWKWARD_STRING: ${{ steps.terraform-output.outputs.awkward_string }}
AWKWARD_OBJ: ${{ join(fromJson(steps.terraform-output.outputs.awkward_compound_output).nested.thevalue) }}
run: |
if [[ "${{ steps.terraform-output.outputs.my_number }}" != "5" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ steps.terraform-output.outputs.my_sensitive_number }}" != "6" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ steps.terraform-output.outputs.my_string }}" != "hello" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ steps.terraform-output.outputs.my_sensitive_string }}" != "password" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ steps.terraform-output.outputs.my_bool }}" != "true" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ steps.terraform-output.outputs.my_sensitive_bool }}" != "false" ]]; then
echo "::error:: output my_number not set correctly"
exit 1
fi
if [[ "${{ fromJson(steps.terraform-output.outputs.my_object).first }}" != "one" ]]; then
echo "::error:: fromJson(my_object).first not set correctly"
exit 1
fi
if [[ "${{ join(fromJson(steps.terraform-output.outputs.my_tuple)) }}" != "one,two" ]]; then
echo "::error:: join(fromJson(my_set)) not set correctly"
exit 1
fi
if [[ "${{ contains(fromJson(steps.terraform-output.outputs.my_set), 'one') }}" != "true" ]]; then
echo "::error:: contains(fromJson(my_set)) not set correctly"
exit 1
fi
if [[ "$AWKWARD_STRING" != "hello \"there\", here are some 'quotes'." ]]; then
echo "::error:: awkward_string not set correctly"
exit 1
fi
if [[ "$AWKWARD_OBJ" != "hello \"there\", here are some 'quotes'." ]]; then
echo "::error:: fromJson(awkward_compound_output).nested.thevalue not set correctly"
exit 1
fi