Page MenuHomePhabricator

[scripts] Fix terraform lint
ClosedPublic

Authored by bartek on Nov 23 2023, 2:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 28 2024, 12:25 AM
Unknown Object (File)
Oct 18 2024, 6:16 AM
Unknown Object (File)
Oct 18 2024, 6:16 AM
Unknown Object (File)
Oct 18 2024, 6:08 AM
Unknown Object (File)
Sep 29 2024, 2:12 AM
Unknown Object (File)
Aug 27 2024, 10:54 PM
Unknown Object (File)
Aug 27 2024, 6:10 PM
Unknown Object (File)
Aug 25 2024, 5:52 PM
Subscribers

Details

Summary

When reviewing D9877 I realized that terraform format lint doesn't work in pre-commit hook. Fixed this.
Also changed it to auto-format instead of failing.

Test Plan

Made some formatting errors in terraform files, git staged them, and ran yarn lint-staged. It fixed them.

Output of terraform_pre_commit.sh (the modules/shared/dynamodb.tf was the file that was reformatted):

ᐅ ./scripts/terraform_pre_commit.sh
Formatting terraform...
modules/shared/dynamodb.tf
Validating 'dev' terraform configuration...
Success! The configuration is valid.

Validating 'remote' terraform configuration...
Success! The configuration is valid.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/tf-lint
Lint
No Lint Coverage
Unit
No Test Coverage