Skip to content

Commit

Permalink
Add AD role to SP (#11)
Browse files Browse the repository at this point in the history
* Add AD role to SP

* Add user-friendly comment for the role_id field
  • Loading branch information
ravinadhruve10 authored Nov 28, 2023
1 parent cad1e6c commit 39a8e63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/services/service-principal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ resource "azuread_service_principal" "sysdig_sp" {
}
}

#---------------------------------------------------------------------------------------------
# Assign "Directory Reader" AD role to Sysdig SP
#---------------------------------------------------------------------------------------------
resource "azuread_directory_role_assignment" "sysdig_ad_reader" {
role_id = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" // template ID of Directory Reader AD role
principal_object_id = azuread_service_principal.sysdig_sp.object_id
}

#---------------------------------------------------------------------------------------------
# Assign "Reader" role to Sysdig SP for primary subscription
#---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 39a8e63

Please sign in to comment.