From 5324d2a7f7e562ae458e358655537db7f6d27055 Mon Sep 17 00:00:00 2001 From: Stephane Selim Date: Fri, 9 Aug 2024 18:36:14 +0200 Subject: [PATCH] fix delete on resourcepolicy --- pkg/controller/cloudwatchlogs/resourcepolicy/setup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/cloudwatchlogs/resourcepolicy/setup.go b/pkg/controller/cloudwatchlogs/resourcepolicy/setup.go index 4533a4504b..bf479d7e99 100644 --- a/pkg/controller/cloudwatchlogs/resourcepolicy/setup.go +++ b/pkg/controller/cloudwatchlogs/resourcepolicy/setup.go @@ -68,7 +68,7 @@ func preUpdate(_ context.Context, cr *svcapitypes.ResourcePolicy, obj *svcsdk.Pu func preDelete(_ context.Context, cr *svcapitypes.ResourcePolicy, obj *svcsdk.DeleteResourcePolicyInput) (bool, error) { obj.PolicyName = pointer.ToOrNilIfZeroValue(meta.GetExternalName(cr)) - return true, nil + return false, nil } func postObserve(_ context.Context, cr *svcapitypes.ResourcePolicy, _ *svcsdk.DescribeResourcePoliciesOutput, obs managed.ExternalObservation, err error) (managed.ExternalObservation, error) {