Skip to content

Commit

Permalink
Give CO Platform Engineering team read-only access to dns repos
Browse files Browse the repository at this point in the history
CO Platform Engineering wants to use it in the process of finding owners of
subdomains.

This will reduce burden on the GOV.UK Platform Engineering team as the CO team
will be able to obtain the information by themselves.
  • Loading branch information
AgaDufrat committed Feb 13, 2025
1 parent 3601651 commit 79fa648
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/deployments/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ resource "github_team" "govuk" {
privacy = "closed"
}

data "github_team" "co_platform_engineering" {
slug = "co-platform-engineering"
}

resource "github_team_repository" "govuk_production_admin_repos" {
for_each = local.repositories
repository = each.key
Expand All @@ -107,6 +111,13 @@ resource "github_team_repository" "govuk_repos" {
permission = try(each.value.teams["govuk"], "push")
}

resource "github_team_repository" "co_platform_engineering_repos" {
for_each = toset(["govuk-dns-tf", "govuk-dns", "govuk-dns-config"])
repository = each.key
team_id = data.github_team.co_platform_engineering.id
permission = try(each.value.teams["co_platform_engineering"], "pull")
}

resource "github_repository" "govuk_repos" {
for_each = local.repositories

Expand Down
3 changes: 3 additions & 0 deletions terraform/deployments/github/repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ repos:
required_status_checks:
additional_contexts:
- test
teams: {
co_platform_engineering: "pull"
}

govuk-fastly:
strict: true
Expand Down

0 comments on commit 79fa648

Please sign in to comment.