From 8614ba0e4559279be3a6a379e36e85a2a691c04e Mon Sep 17 00:00:00 2001 From: artaasadi Date: Tue, 12 Nov 2024 02:50:01 +0100 Subject: [PATCH] fix: fix CrossAccountName --- pkg/describer/worker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/describer/worker.go b/pkg/describer/worker.go index 884a5383..3e4d7b89 100755 --- a/pkg/describer/worker.go +++ b/pkg/describer/worker.go @@ -97,7 +97,9 @@ func doDescribe( return nil, fmt.Errorf(" account credentials: %w", err) } crossAccountName := strings.Split(job.IntegrationLabels["CrossAccountRoleARN"], "/") - creds.CrossAccountRoleName = crossAccountName[1] + if len(crossAccountName) > 1 { + creds.CrossAccountRoleName = crossAccountName[1] + } creds.AccountID = job.ProviderID logger.Info("Creds", zap.Any("creds", creds))