terraform-provider-nsxt icon indicating copy to clipboard operation
terraform-provider-nsxt copied to clipboard

[WIP] Skip attribute processing when no values is assigned in schema

Open ksamoray opened this issue 7 months ago • 8 comments

When a value is not assigned to the schema for some attribute, using d.Get("attr_name").(type) will return a zero or a null string.

That would break when this value is not allowed by NSX and usually we protect against this with an if statement which would assign this attribute a value only when it's set in the schema. With required attributes that cannot happen as NSX will check that a value is assigned prior to the Create() call.

ksamoray avatar Jul 01 '24 14:07 ksamoray