Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions website/docs/r/organization_role_team.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ resource "github_organization_role_team" "example" {
}
```

## Example Usage Security Manager Role

```terraform
locals {
security_manager_id = one([for x in data.github_organization_roles.all_roles.roles : x.role_id if x.name == "security_manager"][*])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't need the splat when I tried it:

Suggested change
security_manager_id = one([for x in data.github_organization_roles.all_roles.roles : x.role_id if x.name == "security_manager"][*])
security_manager_id = one([for x in data.github_organization_roles.all_roles.roles : x.role_id if x.name == "security_manager"])

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how it works for me (with [*]

}

data "github_organization_roles" "all_roles" {}

resource "github_organization_role_team" "security_managers" {
role_id = local.security_manager_id
team_slug = "example-team"
}
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a closing code block "```"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickfloyd fixed, thanks!

## Schema

### Required
Expand Down