-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a struct to represent the variable block in the terraform files This will help in storing this values while parsing tf files.
- Loading branch information
1 parent
6d07fd6
commit 49b7c13
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package module | ||
|
||
import ( | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/zclconf/go-cty/cty" | ||
) | ||
|
||
type Variable struct { | ||
Description string | ||
Type cty.Type | ||
TypeConstraints schema.ExprConstraints | ||
DefaultValue cty.Value | ||
|
||
// In case the version it is before 0.14 sensitive will always be false | ||
// that was actually the default value for prior versions | ||
IsSensitive bool | ||
} |