-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to create schema for variables #49
Conversation
Kind: lang.PlainTextKind, | ||
}, | ||
Expr: schema.ExprConstraints{schema.LiteralTypeExpr{Type: v.Type}}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for support for sensitive attributes (hashicorp/hcl-lang#42)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from the extra blank lines. 👍🏻
I would probably prefer for this to be merged and deal with IsSensitive
in a separate following PR because it will require some other changes here as well so that provider-flagged sensitivity is reflected too:
terraform-schema/schema/convert_json.go
Lines 104 to 111 in 85a7417
cAttrs[name] = &schema.AttributeSchema{ | |
Description: markupContent(attr.Description, attr.DescriptionKind), | |
IsDeprecated: attr.Deprecated, | |
IsComputed: attr.Computed, | |
IsOptional: attr.Optional, | |
IsRequired: attr.Required, | |
Expr: exprConstraintsFromAttribute(attr), | |
} |
Given a map of module variables, create the corresponding body schema with the corresponding variables as attribute schemas. Related to hashicorp/terraform-ls#50.
c73daa9
to
a1b1192
Compare
btw. I would usually recommend an additional test which runs This will make it an interesting test for hcl-lang |
Given a map of module variables, create the corresponding body
schema with the corresponding variables as attribute schemas.
Related to hashicorp/terraform-ls#50.