Skip to content

Commit

Permalink
check: 1) for '-' in locals. 2) multiline 'for' output
Browse files Browse the repository at this point in the history
  • Loading branch information
YegorVolkov committed Aug 9, 2024
1 parent 8d7f427 commit 76bae62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/terraform-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Check local value for network interface names
run: |
if ! grep -q 'locals {' *.tf || ! grep -Eq '(nic_names|network_interface_names)' *.tf; then
if ! grep -q 'locals {' *.tf || ! grep -Eq '(nic-names|network_interface_names)' *.tf; then
echo "Local value for network interface names not found!"
exit 1
fi
Expand All @@ -62,15 +62,15 @@ jobs:
- name: Check local value for security rules
run: |
if ! grep -q 'locals {' *.tf || ! grep -Eq '(security_rules|nsg_rules)' *.tf; then
if ! grep -q 'locals {' *.tf || ! grep -Eq '(security-rules|nsg_rules)' *.tf; then
echo "Local value for security rules not found!"
exit 1
fi
echo "Local value for security rules is present."
- name: Check built-in functions usage
run: |
if ! grep -q 'upper(' *.tf || ! grep -q 'join(' *.tf || ! grep -Eq '\[for.*:' *.tf; then
if ! grep -q 'upper(' *.tf || ! grep -q 'join(' *.tf || ! grep -Pzo '\[\s*.*for.*:' *.tf; then
echo "Required built-in functions not used correctly!"
exit 1
fi
Expand Down

0 comments on commit 76bae62

Please sign in to comment.