From 04a27658835a7b5c791b7017dd41c4e7e04eaae7 Mon Sep 17 00:00:00 2001 From: hunterkepley Date: Tue, 3 Dec 2024 13:09:12 -0500 Subject: [PATCH] OCM-12912 | fix: Combine all policies rather than eating the output --- cmd/dlt/accountroles/cmd.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/dlt/accountroles/cmd.go b/cmd/dlt/accountroles/cmd.go index 851177447..369a8019c 100644 --- a/cmd/dlt/accountroles/cmd.go +++ b/cmd/dlt/accountroles/cmd.go @@ -237,7 +237,8 @@ func deleteAccountRoles(r *rosa.Runtime, env string, prefix string, clusters []* if roles.CheckIfRolesAreHcpSharedVpc(r, finalRoleList) && confirm.Prompt(true, "Create commands to delete Hosted CP shared VPC policies?") { for _, role := range finalRoleList { - policiesOutput, err = r.AWSClient.GetPolicyDetailsFromRole(awssdk.String(role)) + policies, err := r.AWSClient.GetPolicyDetailsFromRole(awssdk.String(role)) + policiesOutput = append(policiesOutput, policies...) if err != nil { r.Reporter.Infof("There was an error getting details of policies attached to role '%s': %v", role, err)