terrajet icon indicating copy to clipboard operation
terrajet copied to clipboard

Add support for numeric sensitive fields

Open Lax77 opened this issue 1 year ago • 0 comments

What problem are you facing?

Currently sensitive fields support is limited String, array of string or map of string.

When upgrading one of the provider that got built with terrajet, eg. provider-jet-datadog to v3.13.1 of terraform provider datadog ran into below issue.

panic: cannot generate crd for resource datadog_synthetics_test: cannot build types for Test: cannot build the Types: cannot infer type from schema of field options_list: cannot infer type from resource schema of element type of Test.OptionsList: cannot infer type from schema of field rum_settings: cannot infer type from resource schema of element type of Test.OptionsList.RumSettings: got type "*float64" for field "ClientTokenID", only types "string", "*string", []string, []*string, "map[string]string" and "map[string]*string" supported as sensitive

Above issue occurred as one of the resource introduced sensitive field of data type number and terrajet do not support numeric sensitive fields.

How could Terrajet help solve your problem?

Enhance NewSensitiveField to support numeric data type to be precise float64.

Lax77 avatar Aug 01 '22 04:08 Lax77