Skip to content

Commit 0a577e4

Browse files
committed
feat: Refactor team data sources to latest pattern
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
1 parent d6cc14c commit 0a577e4

53 files changed

Lines changed: 1946 additions & 1251 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

RESOURCES.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ The overall status of each resource or data source is captured in this document
7979
| `github_organization_custom_role` (🚫) | ⚠️ ||||||
8080
| `github_organization_external_identities` | ⚠️ ||||||
8181
| `github_organization_ip_allow_list` | ⚠️ ||||||
82-
| `github_organization_repository_role` | ⚠️ || | | | |
83-
| `github_organization_repository_roles` | ⚠️ || | | | |
84-
| `github_organization_role` | ⚠️ || | | | |
85-
| `github_organization_role_teams` | ⚠️ || | | | |
86-
| `github_organization_role_users` | ⚠️ || | | | |
87-
| `github_organization_roles` | ⚠️ || | | | |
82+
| `github_organization_repository_role` | || | | | |
83+
| `github_organization_repository_roles` | || | | | |
84+
| `github_organization_role` | || | | | |
85+
| `github_organization_role_teams` | || | | | |
86+
| `github_organization_role_users` | || | | | |
87+
| `github_organization_roles` | || | | | |
8888
| `github_organization_security_managers` (🚫) | ⚠️ ||||||
8989
| `github_organization_team_sync_groups` | ⚠️ ||||||
90-
| `github_organization_teams` | ⚠️ || | | | |
90+
| `github_organization_teams` | || | | | |
9191
| `github_organization_webhooks` | ⚠️ ||||||
9292
| `github_ref` | ⚠️ ||||||
9393
| `github_release` | ⚠️ ||||||
@@ -106,11 +106,11 @@ The overall status of each resource or data source is captured in this document
106106
| `github_repository_pages` | ⚠️ ||||||
107107
| `github_repository_pull_request` | ⚠️ ||||||
108108
| `github_repository_pull_requests` | ⚠️ ||||||
109-
| `github_repository_teams` | ⚠️ || | | | |
109+
| `github_repository_teams` | || | | | |
110110
| `github_repository_webhooks` | ⚠️ ||||||
111111
| `github_rest_api` | ⚠️ ||||||
112112
| `github_ssh_keys` | ⚠️ ||||||
113-
| `github_team` | ⚠️ || | | | |
113+
| `github_team` | || | | | |
114114
| `github_tree` | ⚠️ ||||||
115115
| `github_user` | ⚠️ ||||||
116116
| `github_user_external_identity` | ⚠️ ||||||
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
page_title: "github_organization_repository_role (Data Source) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Lookup a custom organization repository role.
5+
Data source to lookup a custom organization repository role.
56
---
67

78
# github_organization_repository_role (Data Source)
89

9-
Lookup a custom organization repository role.
10-
11-
~> **Note**: Custom organization repository roles are currently only available in GitHub Enterprise Cloud.
10+
Data source to lookup a custom organization repository role.
1211

1312
## Example Usage
1413

@@ -18,15 +17,17 @@ data "github_organization_repository_role" "example" {
1817
}
1918
```
2019

20+
<!-- schema generated by tfplugindocs -->
2121
## Schema
2222

2323
### Required
2424

25-
- `role_id` (Number) The ID of the organization repository role.
25+
- `role_id` (Number) ID of the organization repository role.
2626

2727
### Read-Only
2828

29-
- `name` (String) The name of the organization repository role.
30-
- `description` (String) The description of the organization repository role.
31-
- `base_role` (String) The system role from which this role inherits permissions.
32-
- `permissions` (Set of String) The permissions included in this role.
29+
- `base_role` (String) System role from which this role inherits permissions.
30+
- `description` (String) Description of the organization repository role.
31+
- `id` (String) The ID of this resource.
32+
- `name` (String) Name of the organization repository role.
33+
- `permissions` (Set of String) Additional permissions included in this role.
Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
page_title: "github_organization_repository_roles (Data Source) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Lookup all custom repository roles in an organization.
5+
Data source to list all custom repository roles in an organization.
56
---
67

78
# github_organization_repository_roles (Data Source)
89

9-
Lookup all custom repository roles in an organization.
10-
11-
~> **Note**: Custom organization repository roles are currently only available in GitHub Enterprise Cloud.
10+
Data source to list all custom repository roles in an organization.
1211

1312
## Example Usage
1413

@@ -17,18 +16,42 @@ data "github_organization_repository_roles" "example" {
1716
}
1817
```
1918

19+
<!--
2020
## Schema
2121
2222
### Read-Only
2323
24-
- `roles` (Set of Object, see [schema](#nested-schema-for-roles)) Available organization repository roles.
24+
- `id` (String) The ID of this resource.
25+
- `roles` (List of Object) Available organization repository roles. (see [below for nested schema](#nestedatt--roles))
26+
27+
<a id="nestedatt--roles"></a>
28+
### Nested Schema for `roles`
29+
30+
Read-Only:
31+
32+
- `base_role` (String)
33+
- `description` (String)
34+
- `id` (Number)
35+
- `name` (String)
36+
- `permissions` (Set of String)
37+
- `role_id` (Number)
38+
-->
2539

26-
## Nested Schema for `roles`
40+
## Schema
2741

2842
### Read-Only
2943

30-
- `role_id` (Number) The ID of the organization repository role.
31-
- `name` (String) The name of the organization repository role.
32-
- `description` (String) The description of the organization repository role.
33-
- `base_role` (String) The system role from which this role inherits permissions.
34-
- `permissions` (Set of String) The permissions included in this role.
44+
- `id` (String) The ID of this resource.
45+
- `roles` (List of Object) Available organization repository roles. (see [below for nested schema](#nestedatt--roles))
46+
47+
<a id="nestedatt--roles"></a>
48+
### Nested Schema for `roles`
49+
50+
Read-Only:
51+
52+
- `base_role` (String) System role from which this role inherits permissions.
53+
- `description` (String) Description of the organization repository role.
54+
- `id` (Number) ID of the organization repository role.
55+
- `name` (String) Name of the organization repository role.
56+
- `permissions` (Set of String) Additional permissions included in this role.
57+
- `role_id` (Number, Deprecated) ID of the organization repository role.
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
page_title: "github_organization_role (Data Source) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Lookup a custom organization role.
5+
Data source to lookup a custom organization role.
56
---
67

78
# github_organization_role (Data Source)
89

9-
Lookup a custom organization role.
10+
Data source to lookup a custom organization role.
1011

1112
## Example Usage
1213

@@ -16,16 +17,18 @@ data "github_organization_role" "example" {
1617
}
1718
```
1819

20+
<!-- schema generated by tfplugindocs -->
1921
## Schema
2022

2123
### Required
2224

23-
- `role_id` (Number) The ID of the organization role.
25+
- `role_id` (Number) ID of the organization role.
2426

2527
### Read-Only
2628

27-
- `name` (String) The name of the organization role.
28-
- `description` (String) The description of the organization role.
29-
- `source` (String) The source of this role; one of `Predefined`, `Organization`, or `Enterprise`.
30-
- `base_role` (String) The system role from which this role inherits permissions.
31-
- `permissions` (Set of String) The permissions included in this role.
29+
- `base_role` (String) System role from which this role inherits permissions.
30+
- `description` (String) Description of the organization role.
31+
- `id` (String) The ID of this resource.
32+
- `name` (String) Name of the organization role.
33+
- `permissions` (Set of String) Additional permissions included in this role.
34+
- `source` (String) Source of this role; one of `Predefined`, `Organization`, or `Enterprise`.
Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
page_title: "github_organization_role_teams (Data Source) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Lookup all teams assigned to a custom organization role.
5+
Data source to list all teams assigned to a custom organization role.
56
---
67

78
# github_organization_role_teams (Data Source)
89

9-
Lookup all teams assigned to a custom organization role.
10+
Data source to list all teams assigned to a custom organization role.
1011

1112
## Example Usage
1213

@@ -16,21 +17,74 @@ data "github_organization_role_teams" "example" {
1617
}
1718
```
1819

20+
<!--
1921
## Schema
2022
2123
### Required
2224
23-
- `role_id` (Number) The ID of the organization role.
25+
- `role_id` (Number) ID of the organization role.
2426
2527
### Read-Only
2628
27-
- `teams` (Set of Object, see [schema](#nested-schema-for-teams)) Teams assigned to the organization role.
29+
- `id` (String) The ID of this resource.
30+
- `teams` (List of Object) Teams assigned to the organization role. (see [below for nested schema](#nestedatt--teams))
2831
29-
## Nested Schema for `teams`
32+
<a id="nestedatt--teams"></a>
33+
### Nested Schema for `teams`
34+
35+
Read-Only:
36+
37+
- `assignment` (String)
38+
- `description` (String)
39+
- `id` (Number)
40+
- `name` (String)
41+
- `parent_team` (List of Object) (see [below for nested schema](#nestedobjatt--teams--parent_team))
42+
- `permission` (String)
43+
- `privacy` (String)
44+
- `slug` (String)
45+
- `team_id` (Number)
46+
- `type` (String)
47+
48+
<a id="nestedobjatt--teams--parent_team"></a>
49+
### Nested Schema for `teams.parent_team`
50+
51+
Read-Only:
52+
53+
- `id` (Number)
54+
- `slug` (String)
55+
-->
56+
57+
## Schema
58+
59+
### Required
60+
61+
- `role_id` (Number) ID of the organization role.
3062

3163
### Read-Only
3264

33-
- `team_id` (Number) The ID of the team.
34-
- `slug` (String) The Slug of the team name.
35-
- `name` (String) The name of the team.
36-
- `permission` (String) The permission that the team will have for its repositories.
65+
- `id` (String) The ID of this resource.
66+
- `teams` (List of Object) Teams assigned to the organization role. (see [below for nested schema](#nestedatt--teams))
67+
68+
<a id="nestedatt--teams"></a>
69+
### Nested Schema for `teams`
70+
71+
Read-Only:
72+
73+
- `assignment` (String) Relationship a team has with a role; one of `direct`, `indirect`, or `mixed`.
74+
- `description` (String) Description of the team.
75+
- `id` (Number) ID of the team.
76+
- `name` (String) Name of the team.
77+
- `parent_team` (List of Object) Parent team; only set if this is an indirect assignment. (see [below for nested schema](#nestedobjatt--teams--parent_team))
78+
- `permission` (String) Legacy default repository permission for the team (typically pull, push, or admin), used when adding a repository without specifying an explicit permission. This does not represent effective access for all repositories or custom repository roles.
79+
- `privacy` (String) Privacy level of the team; one of `secret` or `closed`.
80+
- `slug` (String) Slug of the team name.
81+
- `team_id` (Number, Deprecated) ID of the team.
82+
- `type` (String) Ownership type of the team; one of `enterprise` or `organization`.
83+
84+
<a id="nestedobjatt--teams--parent_team"></a>
85+
### Nested Schema for `teams.parent_team`
86+
87+
Read-Only:
88+
89+
- `id` (Number) ID of the parent team.
90+
- `slug` (String) Slug of the parent team name.
Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
page_title: "github_organization_role_users (Data Source) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Lookup all users assigned to a custom organization role.
5+
Data source to list all users assigned to a custom organization role.
56
---
67

78
# github_organization_role_users (Data Source)
89

9-
Lookup all users assigned to a custom organization role.
10+
Data source to list all users assigned to a custom organization role.
1011

1112
## Example Usage
1213

@@ -16,19 +17,44 @@ data "github_organization_role_users" "example" {
1617
}
1718
```
1819

20+
<!--
1921
## Schema
2022
2123
### Required
2224
23-
- `role_id` (Number) The ID of the organization role.
25+
- `role_id` (Number) ID of the organization role.
2426
2527
### Read-Only
2628
27-
- `users` (Set of Object, see [schema](#nested-schema-for-users)) Users assigned to the organization role.
29+
- `id` (String) The ID of this resource.
30+
- `users` (List of Object) Users assigned to the organization role. (see [below for nested schema](#nestedatt--users))
2831
29-
## Nested Schema for `users`
32+
<a id="nestedatt--users"></a>
33+
### Nested Schema for `users`
34+
35+
Read-Only:
36+
37+
- `assignment` (String)
38+
- `login` (String)
39+
- `user_id` (Number)
40+
-->
41+
42+
## Schema
43+
44+
### Required
45+
46+
- `role_id` (Number) ID of the organization role.
3047

3148
### Read-Only
3249

33-
- `user_id` (Number) The ID of the user.
34-
- `login` (String) The login for the GitHub user account.
50+
- `id` (String) The ID of this resource.
51+
- `users` (List of Object) Users assigned to the organization role. (see [below for nested schema](#nestedatt--users))
52+
53+
<a id="nestedatt--users"></a>
54+
### Nested Schema for `users`
55+
56+
Read-Only:
57+
58+
- `assignment` (String) Relationship a user has with a role; one of `direct`, `indirect`, or `mixed`.
59+
- `login` (String) Login of the user.
60+
- `user_id` (Number) ID of the user.

0 commit comments

Comments
 (0)