From ea6e1dbec316a70ef111556a3e892ba24c1bcf71 Mon Sep 17 00:00:00 2001 From: Jeremy Muriel Date: Sat, 30 Apr 2022 11:18:37 +0200 Subject: [PATCH] allow capital letters to resource name on block reader --- lib/blocks/blockreader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/blocks/blockreader.go b/lib/blocks/blockreader.go index b4f97cea..a16744b4 100644 --- a/lib/blocks/blockreader.go +++ b/lib/blocks/blockreader.go @@ -125,7 +125,7 @@ func (bv blockVisitor) Visit(cursor *astutil.Cursor) bool { return true } -var terraformMatcher = regexp.MustCompile(`(((resource|data)\s+"[-a-z0-9_]+")|(variable|output))\s+"[-a-z0-9_]+"\s+\{`) +var terraformMatcher = regexp.MustCompile(`(((resource|data)\s+"[-a-z0-9_]+")|(variable|output))\s+"[-a-zA-Z0-9_]+"\s+\{`) // A simple check to see if the content looks like a Terraform configuration. // Looks for a line with either a resource, data source, variable, or output declaration