From 712dd7f52f0c0ef0f99294cac103d315402316b8 Mon Sep 17 00:00:00 2001 From: Matthew Zech <48557999+mattzech@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:29:36 -0500 Subject: [PATCH] Fix critical error in flowlogs pkg https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ec2#DescribeFlowLogsOutput FlowLogID is not a field defined in DescribeFlowlogsOutput. Need to go inside the resp.FlowLog[] to get the FlowLogID. This is causing a crash any time FlowLog resource is created --- pkg/resource/flow_log/sdk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/resource/flow_log/sdk.go b/pkg/resource/flow_log/sdk.go index 845c0d9e..d2073d6e 100644 --- a/pkg/resource/flow_log/sdk.go +++ b/pkg/resource/flow_log/sdk.go @@ -248,8 +248,8 @@ func (rm *resourceManager) sdkCreate( } rm.setStatusDefaults(ko) - if resp.FlowLogIds[0] != nil { - ko.Status.FlowLogID = resp.FlowLogIds[0] + if resp.FlowLogs[0] != nil { + ko.Status.FlowLogID = resp.FlowLogs[0].FlowLogID } return &resource{ko}, nil }