Add float64 to supported sensitve fields#290
Conversation
81486ad to
f11a882
Compare
Signed-off-by: Lax Kota <lax77@gmail.com>
f11a882 to
75dc677
Compare
|
How is it going with this one ? Can we get this accepted ? |
| f.TFTag = "-" | ||
| switch f.FieldType.String() { | ||
| case "string", "*string": | ||
| case "string", "*string", "float64", "*float64": |
There was a problem hiding this comment.
Have you tested this change manually and confirmed it works? Here is where we take the value from secret and then write to the TF file but it converts it to string before doing so. So, I think we may end up having a "231231241" as value instead of 231231241 in the main.tf.json, which Terraform may accept but better check if that's the case. Otherwise, we need to find a way to discover the type and convert it to that type before calling setSensitiveParametersWithPaved function. cc @turkenh
There was a problem hiding this comment.
I have only tried upgrading terraform-provider-datadog to version v3.14 which seems to work. But did not try creating a resource with it that uses float64 for sensitive fields check. Will test it out and get back
Description of your changes
Add support for float64 data type as sensitive field. We ran into an issue while upgrading provide-jet-datadog to latest release of terraform-provider-datadog as it introduced numeric sensitive field client_token_id of type float64
Fixes # #287
I have:
make reviewableto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR if necessary.How has this code been tested
make generateon a jet providermake reviewable teston a jet provider