diff --git a/docs/data-sources/directory_roles.md b/docs/data-sources/directory_roles.md index 2ce4c59a2b..96539631f5 100644 --- a/docs/data-sources/directory_roles.md +++ b/docs/data-sources/directory_roles.md @@ -43,7 +43,3 @@ The following attributes are exported: * `template_id` - The template ID of the directory role. * `description` - The description of the directory role. * `object_id` - The object ID of the directory role. - -## Import - -This resource does not support importing. diff --git a/internal/services/directoryroles/directory_roles_data_source.go b/internal/services/directoryroles/directory_roles_data_source.go index 8e228657f1..1ba5cbb7ce 100644 --- a/internal/services/directoryroles/directory_roles_data_source.go +++ b/internal/services/directoryroles/directory_roles_data_source.go @@ -15,9 +15,9 @@ import ( "github.com/hashicorp/terraform-provider-azuread/internal/tf" ) -func directoryRoleDataSource() *schema.Resource { +func directoryRolesDataSource() *schema.Resource { return &schema.Resource{ - ReadContext: directoryRoleDataSourceRead, + ReadContext: directoryRolesDataSourceRead, Timeouts: &schema.ResourceTimeout{ Read: schema.DefaultTimeout(5 * time.Minute), @@ -69,7 +69,7 @@ func directoryRoleDataSource() *schema.Resource { } } -func directoryRoleDataSourceRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { +func directoryRolesDataSourceRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*clients.Client).DirectoryRoles.DirectoryRolesClient directoryRoles, _, err := client.List(ctx) diff --git a/internal/services/directoryroles/directory_roles_data_source_test.go b/internal/services/directoryroles/directory_roles_data_source_test.go index 270846cae9..696184b990 100644 --- a/internal/services/directoryroles/directory_roles_data_source_test.go +++ b/internal/services/directoryroles/directory_roles_data_source_test.go @@ -11,7 +11,7 @@ import ( type DirectoryRolesDataSource struct{} -func TestAccDomainsDataSource_basic(t *testing.T) { +func TestAccDirectoryRolesDataSource_basic(t *testing.T) { data := acceptance.BuildTestData(t, "data.azuread_directory_roles", "test") r := DirectoryRolesDataSource{} diff --git a/internal/services/directoryroles/registration.go b/internal/services/directoryroles/registration.go index 0db95596bf..5bd2740f59 100644 --- a/internal/services/directoryroles/registration.go +++ b/internal/services/directoryroles/registration.go @@ -21,7 +21,7 @@ func (r Registration) WebsiteCategories() []string { // SupportedDataSources returns the supported Data Sources supported by this Service func (r Registration) SupportedDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ - "azuread_directory_roles": directoryRoleDataSource(), + "azuread_directory_roles": directoryRolesDataSource(), } }