From 34542fea8fed6be6916486e2242ec99806ea58c1 Mon Sep 17 00:00:00 2001 From: SK Ali Arman Date: Mon, 27 Nov 2023 16:41:02 +0600 Subject: [PATCH] Fix iam/role sync issue Signed-off-by: SK Ali Arman --- config/overrides.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/overrides.go b/config/overrides.go index 70f9d9c..946110e 100644 --- a/config/overrides.go +++ b/config/overrides.go @@ -6,6 +6,7 @@ import ( "github.com/crossplane/upjet/pkg/types/name" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" + "kubedb.dev/provider-aws/config/common" "strings" ) @@ -213,7 +214,11 @@ func KnownReferencers() config.ResourceOption { //nolint:gocyclo continue } switch { - + case strings.HasSuffix(k, "role_arn"): + r.References[k] = config.Reference{ + Type: "kubedb.dev/provider-aws/apis/iam/v1beta1.Role", + Extractor: common.PathARNExtractor, + } case strings.HasSuffix(k, "security_group_ids"): r.References[k] = config.Reference{ Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup",