Skip to content

Commit c194087

Browse files
committed
fix: bool flag
1 parent 42f8d41 commit c194087

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

provisioner/terraform/parse.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"path"
88
"path/filepath"
99
"sort"
10-
"strconv"
1110
"strings"
1211

1312
"github.com/hashicorp/hcl/v2"
@@ -121,15 +120,10 @@ func loadEnabledFeatures(moduleDir string) (map[string]bool, hcl.Diagnostics, er
121120
content, _, partialDiags := block.Body.PartialContent(providerFeaturesConfigSchema)
122121
diags = append(diags, partialDiags...)
123122
if attr, defined := content.Attributes[featureUseManagedVariables]; defined {
124-
var useManagedVariables string
123+
var useManagedVariables bool
125124
partialDiags := gohcl.DecodeExpression(attr.Expr, nil, &useManagedVariables)
126125
diags = append(diags, partialDiags...)
127-
128-
b, err := strconv.ParseBool(useManagedVariables)
129-
if err != nil {
130-
return nil, nil, xerrors.Errorf("can't parse %s flag as boolean: %w", featureUseManagedVariables, err)
131-
}
132-
flags[featureUseManagedVariables] = b
126+
flags[featureUseManagedVariables] = useManagedVariables
133127
}
134128
}
135129
}

0 commit comments

Comments
 (0)