From ac88301294f8354b593f8350e9dace22adcf188e Mon Sep 17 00:00:00 2001 From: Adham Date: Sat, 14 Nov 2020 19:33:21 +0200 Subject: [PATCH] feat(terraform): Add hcl extension support to Terraform module (#1875) * Add hcl file extension to terraform module Signed-off-by: adhaamehab * Update docs Signed-off-by: adhaamehab --- docs/config/README.md | 2 +- src/modules/terraform.rs | 2 +- 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> { let is_terraform_project = context .try_begin_scan()? .set_folders(&[".terraform"]) - .set_extensions(&["tf"]) + .set_extensions(&["tf", "hcl"]) .is_match(); if !is_terraform_project {