From 2906991d9f1d22d49701651e80ec850017d3eacd Mon Sep 17 00:00:00 2001 From: artaasadi Date: Wed, 20 Nov 2024 11:25:25 +0100 Subject: [PATCH] fix: fix unique id --- pkg/sdk/models/resource.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/sdk/models/resource.go b/pkg/sdk/models/resource.go index 1a8d090a..a2435773 100644 --- a/pkg/sdk/models/resource.go +++ b/pkg/sdk/models/resource.go @@ -18,5 +18,11 @@ type Resource struct { } func (r Resource) UniqueID() string { - return r.ID + if r.ID != "" { + return r.ID + } + if r.ARN != "" { + return r.ARN + } + return r.Name }