From 721f9c0039904e5fedd0f986119d109302afdcc6 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Fri, 24 May 2024 16:55:33 -0400 Subject: [PATCH] fix potential nil pointer dereference --- apstra/blueprint/datacenter_generic_system_link.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apstra/blueprint/datacenter_generic_system_link.go b/apstra/blueprint/datacenter_generic_system_link.go index dd55e648..cb39af59 100644 --- a/apstra/blueprint/datacenter_generic_system_link.go +++ b/apstra/blueprint/datacenter_generic_system_link.go @@ -118,7 +118,7 @@ func (o *DatacenterGenericSystemLink) loadApiData(ctx context.Context, in *apstr switchEndpoint := in.OppositeEndpointBySystemId(genericSystemId) o.TargetSwitchId = types.StringValue(switchEndpoint.System.Id.String()) - o.TargetSwitchIfName = types.StringValue(*switchEndpoint.Interface.IfName) + o.TargetSwitchIfName = types.StringPointerValue(switchEndpoint.Interface.IfName) o.GroupLabel = types.StringValue(in.GroupLabel) o.LagMode = utils.StringValueOrNull(ctx, switchEndpoint.Interface.LagMode.String(), diags) o.Tags = utils.SetValueOrNull(ctx, types.StringType, in.TagLabels, diags)