-
Notifications
You must be signed in to change notification settings - Fork 94
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 attr.ValueAs #88
Comments
This is unexpectedly complicated by the need of the I'm elbow-deep in trying to add a We needed the I'm currently 🤔 about whether making |
Another option is to introduce |
This is not true, on investigation. Reflection goes from a type MyValueType struct{}
func (m MyValueType) ValueFromTerraform(_ context.Context, in tftypes.Value) (attr.Value, error) {
return MyValue{val: in, createdBy: MyValueType{}}, nil
}
type MyValue struct {
val tftypes.Value
createdBy attr.Type
}
func (m MyValue) Type(_ context.Context) attr.Type {
return m.createdBy
}
func Create() {
type req struct {
foo MyValue `tfsdk:"foo"`
}
var config req
err := r.Config.Get(ctx, &config)
} This would not work, as I'm going to keep investigating adding |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Module version
Use-cases
As described in #69.
Proposal
As described in #69.
The text was updated successfully, but these errors were encountered: