Skip to content

Commit 3a2c3a9

Browse files
committed
feat(iam): add admins and developers teams for ArgoCD RBAC
Creates GitHub teams that map to ArgoCD roles: - admins: role:admin - developers: role:readonly
1 parent c0d207b commit 3a2c3a9

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ No modules.
2424
| [github_branch_protection.protections](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource |
2525
| [github_membership.admin](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership) | resource |
2626
| [github_repository.repositories](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |
27+
| [github_team.admins](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |
28+
| [github_team.developers](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |
29+
| [github_team_membership.admins_xnoto](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership) | resource |
2730
| [sops_file.secret_vars](https://registry.terraform.io/providers/carlpett/sops/latest/docs/data-sources/file) | data source |
2831

2932
## Inputs

gh-iam.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,23 @@ resource "github_membership" "admin" {
22
username = "xnoto"
33
role = "admin"
44
}
5+
6+
# Teams for ArgoCD RBAC integration
7+
resource "github_team" "admins" {
8+
name = "admins"
9+
description = "ArgoCD administrators"
10+
privacy = "closed"
11+
}
12+
13+
resource "github_team" "developers" {
14+
name = "developers"
15+
description = "ArgoCD read-only access"
16+
privacy = "closed"
17+
}
18+
19+
# Team memberships
20+
resource "github_team_membership" "admins_xnoto" {
21+
team_id = github_team.admins.id
22+
username = "xnoto"
23+
role = "maintainer"
24+
}

0 commit comments

Comments
 (0)