Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa committed Nov 28, 2024
1 parent d7978eb commit 81f830a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/services/newrelic/new_relic_monitor_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (r NewRelicMonitorResource) Create() sdk.ResourceFunc {
}

if err := resourceMonitoredSubscriptionsWaitForAvailable(ctx, monitoredSubscriptionsClient, monitorId, model.MonitoredSubscription); err != nil {
return fmt.Errorf("waiting for the NewRelic Monitored Subscriptions of %s to become available: %+v", id, err)
return fmt.Errorf("waiting for NewRelic Monitored Subscriptions of %s to become available: %+v", id, err)
}

return nil
Expand Down Expand Up @@ -433,11 +433,11 @@ func (r NewRelicMonitorResource) Update() sdk.ResourceFunc {

monitorId := monitoredsubscriptions.NewMonitorID(id.SubscriptionId, id.ResourceGroupName, id.MonitorName)
if err := metadata.Client.NewRelic.MonitoredSubscriptionsClient.CreateOrUpdateThenPoll(ctx, monitorId, monitoredSubscriptionsProperties); err != nil {
return fmt.Errorf("creating NewRelic Monitored Subscriptions for %s: %+v", id, err)
return fmt.Errorf("updating NewRelic Monitored Subscriptions of %s: %+v", id, err)
}

if err := resourceMonitoredSubscriptionsWaitForAvailable(ctx, monitoredSubscriptionsClient, monitorId, originalModel.MonitoredSubscription); err != nil {
return fmt.Errorf("waiting for the NewRelic Monitored Subscriptions for %s to become available: %+v", id, err)
return fmt.Errorf("waiting for NewRelic Monitored Subscriptions of %s to become available: %+v", id, err)
}
}

Expand Down Expand Up @@ -673,7 +673,7 @@ func resourceMonitoredSubscriptionsWaitForAvailable(ctx context.Context, client
}

if _, err := state.WaitForStateContext(ctx); err != nil {
return fmt.Errorf("waiting for the %s to become available: %+v", id, err)
return fmt.Errorf("waiting for NewRelic Monitored Subscriptions of %s to become available: %+v", id, err)
}

return nil
Expand Down

0 comments on commit 81f830a

Please sign in to comment.