Skip to content

Commit 0d312e0

Browse files
committed
Remove blank line
1 parent b58301a commit 0d312e0

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test-target-replace-exclude.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,48 @@ jobs:
626626
exit 1
627627
fi
628628
629+
- name: Plan excluding resources without label
630+
uses: ./tofu-plan
631+
id: plan-exclude-no-label
632+
with:
633+
path: tests/workflows/test-target-replace-exclude
634+
exclude: |
635+
random_string.exclude_me
636+
variables: |
637+
length = 8
638+
639+
- name: Verify exclude plan without label
640+
env:
641+
CHANGES: ${{ steps.plan-exclude-no-label.outputs.changes }}
642+
run: |
643+
if [[ "$CHANGES" != "true" ]]; then
644+
echo "::error:: Exclude plan without label should have changes for non-excluded resources"
645+
exit 1
646+
fi
647+
648+
- name: Apply excluding resources without label
649+
uses: ./tofu-apply
650+
id: apply-exclude-no-label
651+
with:
652+
path: tests/workflows/test-target-replace-exclude
653+
exclude: |
654+
random_string.exclude_me
655+
variables: |
656+
length = 8
657+
658+
- name: Verify exclude apply without label
659+
env:
660+
EXCLUDE_ME: ${{ steps.apply-exclude-no-label.outputs.exclude_me }}
661+
KEEP_ME: ${{ steps.apply-exclude-no-label.outputs.keep_me }}
662+
run: |
663+
# Should NOT have created excluded resource
664+
if [[ "$EXCLUDE_ME" != "" ]]; then
665+
echo "::error:: exclude_me output should be empty (resource excluded without label)"
666+
exit 1
667+
fi
668+
669+
# Should have updated non-excluded resource
670+
if [[ "$KEEP_ME" == "" ]]; then
671+
echo "::error:: keep_me output should be set (resource not excluded without label)"
672+
exit 1
673+
fi

0 commit comments

Comments
 (0)