RELOPS-2345: import and manage all Entra ID groups and role assignments in azure_ad#294
Merged
Conversation
Brings 20 Entra ID security groups under Terraform management in the azure_ad module. Converts existing data sources (Relops, Releng, Taskcluster, InfraSec) to owned resources, adds 16 new groups, and codifies all RBAC role assignments sourced from the RELOPS-2345 audit. - groups.tf: adds azuread_group + azuread_user + azuread_group_member for each group following the existing 0DIN pattern; ownership marked via "Managed by RelOps" description instead of a separate Managed_by_relops group - rbac.tf: drops stale data source blocks; adds missing Relops roles (Billing Reader, Security Reader, User Access Admin, Event Hubs Data Sender), Taskcluster Contributor on TCEng, and assignments for Security Engineering, Cognitive Services, Data SRE, and SEIO - tenant_variables.tf: membership variables for all 20 groups - terraform.tfvars: empty membership stubs with az CLI commands and known display names; populate UPNs before applying Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fills in best-guess UPNs from display names recorded in the RELOPS-2345 audit. All entries need verification against actual Azure AD values via az ad group member list before applying. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix 4 incorrect UPNs in terraform.tfvars (dkirchner, nfurlan, rbaffourawuah, shong — were inferred from display names incorrectly) - Fix azuread v3 breaking change: data "azuread_directory_role" -> resource "azuread_directory_role" for billing_admin in rbac.tf - Fix for_each on service_desk_membership for azuread v3 empty-group workaround - Remove security_engineering group/role assignments — group never existed in Azure; defer to a separate ticket - Import all existing role assignments and ms_store group memberships into Terraform state (plan now shows 0 to add, 19 to change, 0 to destroy — changes are description field updates only) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
jwmossmoz
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the
terraform/azure_admodule up to date with the current state of Entra ID, per the RELOPS-2345 audit.What changed
groups.tfdata "azuread_group"lookups (Relops, Releng, Taskcluster, InfraSec) to ownedazuread_groupresourcesazuread_group+data "azuread_user"(UPN → object ID) +azuread_group_memberManaged_by_relopstracking group; ownership is now expressed via a"Managed by RelOps — <purpose>"description on each grouprbac.tfFixes azuread v3 breaking change:
data "azuread_directory_role"→resource "azuread_directory_role"for Billing AdminCodifies existing Azure role assignments (built-in roles already granted to these groups in Azure) that were missing from
rbac.tf— no new permissions granted:tenant_variables.tflist(string)membership variable for each groupterraform.tfvarsdkirchner,nfurlan,rbaffourawuah,shongState
All groups, memberships (62 records), and role assignments have been imported into Terraform state.
terraform planproduces 0 to add, 19 to change, 0 to destroy — the 19 changes aredescriptionfield additions on existing groups.Test plan
terraform plan: 0 to add, 19 to change, 0 to destroyterraform apply🤖 Generated with Claude Code