Skip to content

Commit

Permalink
Add owners to app, sp and groups
Browse files Browse the repository at this point in the history
  • Loading branch information
simongottschlag committed Mar 1, 2023
1 parent f7fdecb commit d1fb84f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform-module/azcagit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ locals {

resource "azuread_application" "azcagit" {
display_name = "sp-${local.eln}-azcagit"
owners = var.aad_resource_owner_object_ids
}

resource "azuread_service_principal" "azcagit" {
application_id = azuread_application.azcagit.application_id
owners = var.aad_resource_owner_object_ids
}

resource "azuread_application_password" "azcagit" {
Expand Down
1 change: 1 addition & 0 deletions terraform-module/platform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "azurerm_servicebus_namespace" "azcagit_trigger" {
resource "azuread_group" "azcagit_trigger" {
display_name = "aad-${local.eln}"
security_enabled = true
owners = var.aad_resource_owner_object_ids
}

resource "azuread_group_member" "azcagit_trigger" {
Expand Down
6 changes: 6 additions & 0 deletions terraform-module/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ variable "network" {
subnet_address_prefix = "10.0.0.0/20"
}
}

variable "aad_resource_owner_object_ids" {
description = "Add the list of object_ids as owners to the Azure AD applications, service principals and groups"
type = list(string)
default = []
}

0 comments on commit d1fb84f

Please sign in to comment.