Skip to content

Commit 4f70939

Browse files
committed
docs: add example on how to grant security manager role with github_organization_role_team resource
Signed-off-by: AvivGuiser <[email protected]>
1 parent 63076f7 commit 4f70939

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

website/docs/r/organization_role_team.html.markdown

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ resource "github_organization_role_team" "example" {
1818
}
1919
```
2020

21+
## Example Usage Security Manager Role
22+
23+
```terraform
24+
locals {
25+
security_manager_id = one([for x in data.github_organization_roles.all_roles.roles : x.role_id if x.name == "security_manager"][*])
26+
}
27+
28+
data "github_organization_roles" "all_roles" {}
29+
30+
resource "github_organization_role_team" "security_managers" {
31+
role_id = local.security_manager_id
32+
team_slug = "example-team"
33+
}
34+
2135
## Schema
2236
2337
### Required

0 commit comments

Comments
 (0)