From b39cc070a0127f2672a770912bca26fc6431b379 Mon Sep 17 00:00:00 2001 From: xiaopeng Date: Mon, 6 Jan 2025 13:43:48 +0800 Subject: [PATCH] fix inconsistency with basetype.string --- akp/types/types.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/akp/types/types.go b/akp/types/types.go index b6ca650..0de13f3 100644 --- a/akp/types/types.go +++ b/akp/types/types.go @@ -5,7 +5,6 @@ import ( "context" "fmt" "strconv" - "strings" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" @@ -575,8 +574,8 @@ func toExtensionsAPIModel(entries basetypes.ListValue) []*v1alpha1.ArgoCDExtensi var extensions []*v1alpha1.ArgoCDExtensionInstallEntry for _, entry := range entries.Elements() { obj := entry.(basetypes.ObjectValue) - id := strings.Trim(obj.Attributes()["id"].String(), `"`) - version := strings.Trim(obj.Attributes()["version"].String(), `"`) + id := obj.Attributes()["id"].(basetypes.StringValue).ValueString() + version := obj.Attributes()["version"].(basetypes.StringValue).ValueString() extensions = append(extensions, &v1alpha1.ArgoCDExtensionInstallEntry{ Id: id, Version: version,