terraform-plugin-framework
terraform-plugin-framework copied to clipboard
cannot store 33.33333333 in float64
Module version
1.15.1
Relevant provider source code
// schema
Parameters: []function.Parameter{
function.Float64Parameter{
Name: "number",
Description: "Input number parameter for determining the rounding.",
},
},
// go type reflection
var inputNum float64
resp.Error = req.Arguments.Get(ctx, &inputNum)
Terraform Configuration Files
Please see mschuchard/terraform-provider-stdlib#2
Debug Output
upon request
Expected Behavior
The return of 100 / 3 in HCL2 is valid as a float64 tftype.
I am unsure whether this is an issue in my provider, tftypes, terraform core, or go-cty, and so I am filing this issue here first for feedback since my suspicion is the issue is related to the return type of the / operator, and therefore most likely tftypes or go-cty in that order.
Actual Behavior
Please see mschuchard/terraform-provider-stdlib#2
Steps to Reproduce
n/a
References
linked above