| 64 | var errTerraformInstallFailed = errors.New("failed to install terraform") |
| 65 | |
| 66 | func (i *terraformInputs) parseResourceFetchers(api *auth0.API, apiv2 *auth0.APIV2) ([]resourceDataFetcher, error) { |
| 67 | fetchers := make([]resourceDataFetcher, 0) |
| 68 | var err error |
| 69 | |
| 70 | for _, resource := range i.Resources { |
| 71 | switch resource { |
| 72 | case "auth0_action": |
| 73 | fetchers = append(fetchers, &actionResourceFetcher{api}) |
| 74 | case "auth0_attack_protection": |
| 75 | fetchers = append(fetchers, &attackProtectionResourceFetcher{}) |
| 76 | case "auth0_branding": |
| 77 | fetchers = append(fetchers, &brandingResourceFetcher{}) |
| 78 | case "auth0_branding_theme": |
| 79 | fetchers = append(fetchers, &brandingThemeResourceFetcher{api}) |
| 80 | case "auth0_phone_provider": |
| 81 | fetchers = append(fetchers, &phoneProviderResourceFetcher{api}) |
| 82 | case "auth0_phone_notification_template": |
| 83 | fetchers = append(fetchers, &phoneNotificationTemplateResourceFetcher{apiv2}) |
| 84 | case "auth0_client", "auth0_client_credentials": |
| 85 | fetchers = append(fetchers, &clientResourceFetcher{api}) |
| 86 | case "auth0_client_grant": |
| 87 | fetchers = append(fetchers, &clientGrantResourceFetcher{api}) |
| 88 | case "auth0_connection", "auth0_connection_clients": |
| 89 | fetchers = append(fetchers, &connectionResourceFetcher{api}) |
| 90 | case "auth0_custom_domain": |
| 91 | fetchers = append(fetchers, &customDomainResourceFetcher{api}) |
| 92 | case "auth0_email_provider": |
| 93 | fetchers = append(fetchers, &emailProviderResourceFetcher{api}) |
| 94 | case "auth0_email_template": |
| 95 | fetchers = append(fetchers, &emailTemplateResourceFetcher{api}) |
| 96 | case "auth0_flow": |
| 97 | fetchers = append(fetchers, &flowResourceFetcher{api}) |
| 98 | case "auth0_flow_vault_connection": |
| 99 | fetchers = append(fetchers, &flowVaultConnectionResourceFetcher{api}) |
| 100 | case "auth0_form": |
| 101 | fetchers = append(fetchers, &formResourceFetcher{api}) |
| 102 | case "auth0_guardian": |
| 103 | fetchers = append(fetchers, &guardianResourceFetcher{}) |
| 104 | case "auth0_log_stream": |
| 105 | fetchers = append(fetchers, &logStreamResourceFetcher{api}) |
| 106 | case "auth0_organization", "auth0_organization_connections", "auth0_organization_discovery_domains": |
| 107 | fetchers = append(fetchers, &organizationResourceFetcher{api}) |
| 108 | case "auth0_network_acl": |
| 109 | fetchers = append(fetchers, &networkACLResourceFetcher{api}) |
| 110 | case "auth0_pages": |
| 111 | fetchers = append(fetchers, &pagesResourceFetcher{}) |
| 112 | case "auth0_prompt": |
| 113 | fetchers = append(fetchers, &promptResourceFetcher{}) |
| 114 | case "auth0_prompt_custom_text": |
| 115 | fetchers = append(fetchers, &promptCustomTextResourceFetcherResourceFetcher{api}) |
| 116 | case "auth0_prompt_screen_partial": |
| 117 | fetchers = append(fetchers, &promptScreenPartialResourceFetcher{}) |
| 118 | case "auth0_prompt_screen_renderer": |
| 119 | fetchers = append(fetchers, &promptScreenRendererResourceFetcher{api}) |
| 120 | case "auth0_resource_server", "auth0_resource_server_scopes": |
| 121 | fetchers = append(fetchers, &resourceServerResourceFetcher{api}) |
| 122 | case "auth0_role", "auth0_role_permissions": |
| 123 | fetchers = append(fetchers, &roleResourceFetcher{api}) |