From faeb3010daa5faa6a1b8d0bbf3f468a1d3ad1904 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 2 Mar 2022 11:29:35 +0100 Subject: [PATCH] add Variable.Type func --- hcl2template/types.variables.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index 2e4343b55..86b32032d 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -66,6 +66,10 @@ type Variable struct { Range hcl.Range } +func (v *Variable) Type() cty.Type { + return v.ExpectedType +} + func (v *Variable) GoString() string { b := &strings.Builder{} fmt.Fprintf(b, "{type:%s", v.ExpectedType.GoString())