Skip to content

Commit eff1320

Browse files
authored
fix(group-mapping): Improve the documentation (#518)
* refactor on examples
1 parent 0b0403f commit eff1320

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

website/docs/r/group_mapping.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Creates a group mapping in Sysdig.
1414

1515
## Example Usage
1616

17+
### Regular users
18+
1719
```terraform
1820
resource "sysdig_group_mapping" "my_group" {
1921
group_name = "my-group"
@@ -28,14 +30,34 @@ resource "sysdig_group_mapping" "my_group" {
2830
}
2931
3032
```
33+
This way, we define a group mapping named "my-group" for a user who will have a standard role in two teams.
34+
35+
### Admin users
36+
If the group members should assume the Sysdig administrator role the mapping should be created this way
37+
38+
```terraform
39+
resource "sysdig_group_mapping" "admin" {
40+
group_name = "admin"
41+
role = "ROLE_TEAM_MANAGER"
42+
system_role = "ROLE_CUSTOMER"
43+
44+
team_map {
45+
all_teams = true
46+
team_ids = []
47+
}
48+
}
49+
```
50+
The name doesn’t necessarily have to be “admin,” it’s just an example. The important aspects are the roles and the team_map
3151

3252
## Argument Reference
3353

3454
* `group_name` - (Required) The group name to be mapped.
3555

3656
* `role` - (Required) The role that is assigned to the users. It can be a standard role or a custom team role ID.
3757

38-
* `system_role` (Optional) The system role that is assigned to the users.
58+
* `system_role` (Optional) The system role that is assigned to the users. The supported values are:
59+
* `ROLE_USER` for regular users (Default if not specified)
60+
* `ROLE_CUSTOMER` for admin users
3961

4062
* `team_map` - (Required) Block to define team mapping.
4163

0 commit comments

Comments
 (0)