From 2f318ce97d6bd058894e35a413c001e647681ae1 Mon Sep 17 00:00:00 2001 From: simar7 <1254783+simar7@users.noreply.github.com> Date: Wed, 10 May 2023 02:18:19 -0600 Subject: [PATCH] fix(terraform): Support tfvars (#4123) --- pkg/fanal/analyzer/config/config.go | 2 +- pkg/fanal/analyzer/config/terraform/terraform.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/fanal/analyzer/config/config.go b/pkg/fanal/analyzer/config/config.go index 67ecb62c8de2..b5f3569d0ab4 100644 --- a/pkg/fanal/analyzer/config/config.go +++ b/pkg/fanal/analyzer/config/config.go @@ -15,7 +15,7 @@ import ( var ( _ analyzer.PostAnalyzer = (*Analyzer)(nil) - requiredExts = []string{".json", ".yaml", ".yml"} + requiredExts = []string{".json", ".yaml", ".yml", ".tfvars"} ) // Analyzer represents an analyzer for config files, diff --git a/pkg/fanal/analyzer/config/terraform/terraform.go b/pkg/fanal/analyzer/config/terraform/terraform.go index 025b4b3dd869..f612b4ce0eb6 100644 --- a/pkg/fanal/analyzer/config/terraform/terraform.go +++ b/pkg/fanal/analyzer/config/terraform/terraform.go @@ -19,6 +19,7 @@ const ( var requiredExts = []string{ ".tf", ".tf.json", + ".tfvars", } func init() {