| 295 | } |
| 296 | |
| 297 | func (f *connectionResourceFetcher) FetchData(ctx context.Context) (importDataList, error) { |
| 298 | var data importDataList |
| 299 | |
| 300 | var page int |
| 301 | for { |
| 302 | connections, err := f.api.Connection.List( |
| 303 | ctx, |
| 304 | management.Page(page), |
| 305 | management.IncludeFields("id", "name"), |
| 306 | ) |
| 307 | if err != nil { |
| 308 | return nil, err |
| 309 | } |
| 310 | |
| 311 | for _, connection := range connections.Connections { |
| 312 | data = append(data, |
| 313 | importDataItem{ |
| 314 | ResourceName: "auth0_connection." + sanitizeResourceName(connection.GetName()), |
| 315 | ImportID: connection.GetID(), |
| 316 | }, |
| 317 | importDataItem{ |
| 318 | ResourceName: "auth0_connection_clients." + sanitizeResourceName(connection.GetName()), |
| 319 | ImportID: connection.GetID(), |
| 320 | }, |
| 321 | ) |
| 322 | } |
| 323 | |
| 324 | if !connections.HasNext() { |
| 325 | break |
| 326 | } |
| 327 | |
| 328 | page++ |
| 329 | } |
| 330 | |
| 331 | return data, nil |
| 332 | } |
| 333 | |
| 334 | func (f *customDomainResourceFetcher) FetchData(ctx context.Context) (importDataList, error) { |
| 335 | var data importDataList |