Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jul 24, 2023
1 parent bcd8afc commit 0439d31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/data-sources/directory_role_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ This data source does not have any arguments.
The following attributes are exported:

* `object_ids` - The object IDs of the role templates.
* `roles` - A list of role templates. Each `template` object provides the attributes documented below.
* `role_templates` - A list of role templates. Each `role_template` object provides the attributes documented below.

---

`role` object exports the following:
`role_template` object exports the following:

* `display_name` - The display name of the directory role template.
* `description` - The description of the directory role template.
* `display_name` - The display name of the directory role template.
* `object_id` - The object ID of the directory role template.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func directoryRoleTemplatesDataSourceRead(ctx context.Context, d *schema.Resourc

d.SetId("templates#" + base64.URLEncoding.EncodeToString(h.Sum(nil)))

tf.Set(d, "templates", templateList)
tf.Set(d, "role_templates", templateList)
tf.Set(d, "object_ids", objectIds)

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ func TestAccDirectoryRoleTemplatesDataSource_basic(t *testing.T) {

func (DirectoryRoleTemplatesDataSource) testCheckFunc(data acceptance.TestData, additionalChecks ...resource.TestCheckFunc) resource.TestCheckFunc {
checks := []resource.TestCheckFunc{
check.That(data.ResourceName).Key("roles.0.description").Exists(),
check.That(data.ResourceName).Key("roles.0.display_name").Exists(),
check.That(data.ResourceName).Key("roles.0.object_id").Exists(),
check.That(data.ResourceName).Key("role_templates.0.description").Exists(),
check.That(data.ResourceName).Key("role_templates.0.display_name").Exists(),
check.That(data.ResourceName).Key("role_templates.0.object_id").Exists(),
check.That(data.ResourceName).Key("object_ids.#").Exists(),
}
checks = append(checks, additionalChecks...)
Expand Down

0 comments on commit 0439d31

Please sign in to comment.