summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdham <adhaamehab.me@gmail.com>2020-11-14 19:33:21 +0200
committerGitHub <noreply@github.com>2020-11-14 18:33:21 +0100
commitac88301294f8354b593f8350e9dace22adcf188e (patch)
tree4ba7a08d9a80492030a387f0e40239a41ddaba76
parent680663f5b3041a75a144508b017f2340cff8b7df (diff)
feat(terraform): Add hcl extension support to Terraform module (#1875)
* Add hcl file extension to terraform module Signed-off-by: adhaamehab <adhaamehab.me@gmail.com> * Update docs Signed-off-by: adhaamehab <adhaamehab.me@gmail.com>
-rw-r--r--docs/config/README.md2
-rw-r--r--src/modules/terraform.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 8d5876ff6..ff52a53f1 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -2244,7 +2244,7 @@ If you still want to enable it, [follow the example shown below](#with-version).
The module will be shown if any of the following conditions are met:
- The current directory contains a `.terraform` folder
-- Current directory contains a file with the `.tf` extension
+- Current directory contains a file with the `.tf` or `.hcl` extensions
### Options
diff --git a/src/modules/terraform.rs b/src/modules/terraform.rs
index e12aa3a9b..95d3706e3 100644
--- a/src/modules/terraform.rs
+++ b/src/modules/terraform.rs
@@ -16,7 +16,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
let is_terraform_project = context
.try_begin_scan()?
.set_folders(&[".terraform"])
- .set_extensions(&["tf"])
+ .set_extensions(&["tf", "hcl"])
.is_match();
if !is_terraform_project {