MCPcopy Create free account
hub / github.com/auth0/auth0-cli / FetchData

Method FetchData

internal/cli/terraform_fetcher.go:334–360  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

332}
333
334func (f *customDomainResourceFetcher) FetchData(ctx context.Context) (importDataList, error) {
335 var data importDataList
336
337 customDomains, err := f.api.CustomDomain.List(ctx)
338 if err != nil {
339 errNotEnabled := []string{
340 "The account is not allowed to perform this operation, please contact our support team",
341 "There must be a verified credit card on file to perform this operation",
342 }
343
344 for _, e := range errNotEnabled {
345 if strings.Contains(err.Error(), e) {
346 return data, nil
347 }
348 }
349 return nil, err
350 }
351
352 for _, domain := range customDomains {
353 data = append(data, importDataItem{
354 ResourceName: "auth0_custom_domain." + sanitizeResourceName(domain.GetDomain()),
355 ImportID: domain.GetID(),
356 })
357 }
358
359 return data, nil
360}
361
362func (f *emailProviderResourceFetcher) FetchData(ctx context.Context) (importDataList, error) {
363 _, err := f.api.EmailProvider.Read(ctx)

Calls 3

sanitizeResourceNameFunction · 0.85
ListMethod · 0.65
ErrorMethod · 0.45