Skip to content

Commit

Permalink
data.azurerm_redis_cache : fix issue when no patch schedules can be…
Browse files Browse the repository at this point in the history
… found (#20516)
  • Loading branch information
sinbai authored Feb 17, 2023
1 parent 9771a6d commit ccddd23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/services/redis/redis_cache_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ func dataSourceRedisCacheRead(d *pluginsdk.ResourceData, meta interface{}) error
patchScheduleRedisId := patchschedules.NewRediID(id.SubscriptionId, id.ResourceGroupName, id.RedisName)
schedule, err := patchSchedulesClient.Get(ctx, patchScheduleRedisId)
if err != nil {
return fmt.Errorf("obtaining patch schedules for %s: %+v", id, err)
if !response.WasNotFound(schedule.HttpResponse) {
return fmt.Errorf("obtaining patch schedules for %s: %+v", id, err)
}
}
var patchSchedule []interface{}
if model := schedule.Model; model != nil {
Expand Down

0 comments on commit ccddd23

Please sign in to comment.