File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
internal/elasticsearch/index/data_stream_lifecycle Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -273,12 +273,16 @@ func checkResourceDataStreamLifecycleDestroy(s *terraform.State) error {
273273
274274 defer res .Body .Close ()
275275
276- dStreams := make (map [string ][]models.DataStreamLifecycle )
276+ dStreams := struct {
277+ DataStreams []models.DataStreamLifecycle `json:"data_streams,omitempty"`
278+ }{}
279+
277280 if err := json .NewDecoder (res .Body ).Decode (& dStreams ); err != nil {
278281 return err
279282 }
283+
280284 // for lifecycle with wildcard empty array is returned
281- if len (dStreams [ "data_streams" ] ) > 0 {
285+ if len (dStreams . DataStreams ) > 0 {
282286 return fmt .Errorf ("Data Stream Lifecycle (%s) still exists" , compId .ResourceId )
283287 }
284288 }
You can’t perform that action at this time.
0 commit comments