Hey Team,
I was working on writing terraform provider for one of our products, using terraform-plugin-framework. I’m observing few challenges, Please help me with this.
After apply, i get below error,
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to netscalersdx_mpsgroup.tf_mpsgroup, provider "provider[\"registry.terraform.io/netscaler/netscalersdx\"]" produced an unexpected new value: .assign_all_devices: was null, but now cty.False.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to netscalersdx_mpsgroup.tf_mpsgroup, provider "provider[\"registry.terraform.io/netscaler/netscalersdx\"]" produced an unexpected new value: .bound_entity_selected: was null, but now cty.NumberIntVal(0).
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to netscalersdx_mpsgroup.tf_mpsgroup, provider "provider[\"registry.terraform.io/netscaler/netscalersdx\"]" produced an unexpected new value: .assign_all_autoscale_groups: was null, but now cty.True.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to netscalersdx_mpsgroup.tf_mpsgroup, provider "provider[\"registry.terraform.io/netscaler/netscalersdx\"]" produced an unexpected new value: .tenant_id: was null, but now
│ cty.StringVal("12345f67h89j0").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
my schema for one of the attribute is:
"tenant_id": schema.StringAttribute{
Optional: true,
Description: "Id of the tenant. Minimum length = 1 Maximum length = 128",
MarkdownDescription: "Id of the tenant. Minimum length = 1 Maximum length = 128",
},
And in the Read method, I’m setting the values if only its not empty
if getResponseData["tenant_id"] != "" {
data.TenantId = types.StringValue(getResponseData["tenant_id"].(string))
}
There is the similar configuration to all the other attributes.