Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer authored Jan 11, 2023
1 parent 5900a63 commit 632472f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions docs/data-sources/directory_roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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{}

Expand Down
2 changes: 1 addition & 1 deletion internal/services/directoryroles/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down

0 comments on commit 632472f

Please sign in to comment.