{
"request": "Triage Jira ticket MZCLD-3828: Fix perma-diff with `moco-security-managers` pull access",
"references": [
"https://mozilla-hub.atlassian.net/browse/MZCLD-3828"
],
"sourceContext": {
"issue": "MZCLD-3828"
}
}MZCLD-3828 tracks a Terraform perma-diff caused by the `moco-security-managers` GitHub team being granted org-level "security manager" access outside of Terraform. Because the `github_repository_collaborators` resource is treated as authoritative, Terraform sees this out-of-band team grant every run and tries to reconcile it, causing perpetual drift. The ticket is already "In Progress" with no comments yet, so this triage note is to confirm the fix path and flag a couple of open questions before the fix lands.
Triage: Confirmed root cause — `moco-security-managers` is an org-level team with GitHub "security manager" access, granted outside Terraform. Since `github_repository_collaborators` is authoritative, every plan shows drift trying to reconcile this team.
Recommended fix (per GitHub Terraform provider docs already referenced in the description): for each affected repo's `github_repository_collaborators` resource, add an `ignore_team { team_id = "moco-security-managers" }` block rather than trying to explicitly manage the team's role — since GitHub's org-level "security manager" role doesn't map cleanly to a repo-level permission (pull/push/admin), attempting to codify a specific role risks misrepresenting actual access and could still drift.
Before merging: (1) enumerate all repos where this team currently has access to make sure the ignore_team block (or module-level default) is applied consistently, ideally via a shared module rather than per-repo edits, and (2) run `terraform plan` across affected repos to confirm the diff clears. No linked runbook/design doc was found on this ticket — if one exists elsewhere, please link it for future reference.
[
{
"capability": "jira.issue.read",
"args": {
"key": "MZCLD-3828"
},
"result": {
"key": "MZCLD-3828",
"summary": "Fix perma-diff with `moco-security-managers` pull access",
"status": "In Progress",
"description_text": "https://github.com/orgs/mozilla/teams/moco-security-managers has been granted security manager access at the organization level. The github_repository_collaborators resource we\u2019re using is an authoritative binding so we\u2019ll need to add the team to the configuration with the correct role or add it to an ignore_team block. From Teams added to the repository outside of Terraform can be managed by adding them to the configuration, or ignored by using the ignore_team argument. This is particularly important for organization/enterprise teams, which either need to be added to the configuration or ignored, as otherwise they will cause perpetual drift.",
"comment_count": 0,
"comments": []
}
}
]{
"model": "claude-sonnet-5",
"input_tokens": 3211,
"output_tokens": 1749,
"estimated_cost_usd": 0.035868000000000004
}[]