Skip to content

Commit

Permalink
Bug fix azurerm_api_management_api_operation_tag get tag by operati…
Browse files Browse the repository at this point in the history
…on (#16006)

Issue: #15921
  • Loading branch information
xuzhang3 authored Mar 26, 2022
1 parent 47f5f42 commit f00b680
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f00b680

Please sign in to comment.