File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,22 @@ type Resource struct {
569569 // other user facing usage. It can be plain-text or markdown depending on the
570570 // global DescriptionKind setting. This field is valid for any Resource.
571571 Description string
572+
573+ // UseJSONNumber should be set when state upgraders will expect
574+ // json.Numbers instead of float64s for numbers. This is added as a
575+ // toggle for backwards compatibility for type assertions, but should
576+ // be used in all new resources to avoid bugs with sufficiently large
577+ // user input. This field is only valid when the Resource is a managed
578+ // resource.
579+ //
580+ // See github.com/hashicorp/terraform-plugin-sdk/issues/655 for more
581+ // details.
582+ //
583+ // Fork: We only add this for backward compatibility purposes. This
584+ // bool is not used in any of the codebase and serves only when a resource
585+ // has opted into `UseJSONNumber` in the resource definition. This only
586+ // is in place to allow providers to compile.
587+ UseJSONNumber bool
572588}
573589
574590// ShimInstanceStateFromValue converts a cty.Value to a
You can’t perform that action at this time.
0 commit comments