-
Notifications
You must be signed in to change notification settings - Fork 24
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 for ObjectExpr expression type #23
Conversation
4315086
to
df95a1d
Compare
@@ -30,15 +30,17 @@ func detailForAttribute(attr *schema.AttributeSchema) string { | |||
var detail string | |||
if attr.IsRequired { | |||
detail = "Required" | |||
} else { | |||
} else if attr.IsOptional { |
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.
This was actually never correct, it just came up now because AnyAttribute
(where none of Required or Optional is typically set) is used in the required_providers
block which was changed in 0.15.
Kind: lang.TupleCandidateKind, | ||
Label: fmt.Sprintf(`[%s]`, labelForConstraints(c.AnyElem)), | ||
Detail: c.Name, | ||
Description: c.Description, |
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.
Small (unrelated) fix I made as I was reading through the code, probably doesn't affect much in practice though as we don't have too many tuple expressions with description.
Kind: lang.MapCandidateKind, | ||
Label: fmt.Sprintf(`{ key =%s}`, labelForConstraints(c.Elem)), | ||
Detail: c.FriendlyName(), | ||
Description: c.Description, |
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.
Small (unrelated) fix I made as I was reading through the code, probably doesn't affect much in practice though as we don't have too many map expressions with description.
df95a1d
to
61ccc17
Compare
This is to support recent changes in core schema introduced in Terraform 0.15 where an object can contain traversals - i.e. not literals.