Hi, this is my first time using the framework instead of the sdk plugin.
I have the following question, how to handle the following scenario
At the start of the create I perform a search to check if the resource exists in the lab, and if it does, I load it, but when I load the resource I get an error.
I have a list of objects with three parameters that are part of the create or update, but the get only returns two of the parameters, causing the following error: does not correlate with any element in actual.
.
How can I handle it?
Part of the schema
"radius_servers": schema.SetNestedAttribute{
PlanModifiers: []planmodifier.Set{
setplanmodifier.UseStateForUnknown(),
},
MarkdownDescription: `The RADIUS 802.1x servers to be used for authentication.`,
Optional: true,
Computed: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"host": schema.StringAttribute{
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
MarkdownDescription: `The IP address of your RADIUS server.`,
Optional: true,
Computed: true,
},
"port": schema.Int64Attribute{
PlanModifiers: []planmodifier.Int64{
int64planmodifier.UseStateForUnknown(),
},
MarkdownDescription: `The UDP port your RADIUS servers listens on for Access-requests.`,
Optional: true,
Computed: true,
},
"secret": schema.StringAttribute{
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
MarkdownDescription: `The RADIUS client shared secret.`,
Optional: true,
},
},
},
},
Part of the code where I assign the get response
if response.RadiusServers != nil {
result := make([]ResponseApplianceGetNetworkApplianceSsidRadiusServersRs, len(*response.RadiusServers))
for i, radiusServers := range *response.RadiusServers {
result[i] = ResponseApplianceGetNetworkApplianceSsidRadiusServersRs{
Host: types.StringValue(radiusServers.Host),
Port: types.Int64Value(int64(*radiusServers.Port)),
}
}
r.RadiusServers = &result
}
provider “provider["hashicorp.com/edu/meraki"]” produced an unexpected new
│ value: .radius_servers: planned set element cty.ObjectVal(map[string]cty.Value{“host”:cty.StringVal(“1.2.3.4”), “port”:cty.NumberIntVal(1000),
│ “secret”:cty.StringVal(“secret”)}) does not correlate with any element in actual.
What can I do in this case?
Is there any way to ignore that?
If you can provide me with an example, I would appreciate it.