From 48814039dc33eb8c55182ad30e1d4af91a311215 Mon Sep 17 00:00:00 2001 From: Zooopx Date: Thu, 24 Mar 2022 17:40:34 +0800 Subject: [PATCH] get tag by operation --- .../apimanagement/api_management_api_operation_tag_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/apimanagement/api_management_api_operation_tag_resource.go b/internal/services/apimanagement/api_management_api_operation_tag_resource.go index b7cd17d033a9..6eeb705adfa4 100644 --- a/internal/services/apimanagement/api_management_api_operation_tag_resource.go +++ b/internal/services/apimanagement/api_management_api_operation_tag_resource.go @@ -74,7 +74,7 @@ func resourceApiManagementApiOperationTagCreateUpdate(d *pluginsdk.ResourceData, id := parse.NewOperationTagID(subscriptionId, apiOperationId.ResourceGroup, apiOperationId.ServiceName, apiOperationId.ApiName, apiOperationId.OperationName, name) if d.IsNewResource() { - existing, err := client.Get(ctx, apiOperationId.ResourceGroup, apiOperationId.ServiceName, name) + existing, err := client.GetByOperation(ctx, apiOperationId.ResourceGroup, apiOperationId.ServiceName, apiOperationId.ApiName, apiOperationId.OperationName, name) if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("checking for presence of existing Tag %q: %s", id, err)