Skip to content
Snippets Groups Projects
Commit 37129048 authored by Viacheslav Tarasov - SLB's avatar Viacheslav Tarasov - SLB
Browse files

Added azuread_service_principal and an owner of the AD app

parent 4c06977a
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ resource "azuread_application" "main" {
public_client = local.public_client
oauth2_allow_implicit_flow = var.oauth2_allow_implicit_flow
group_membership_claims = var.group_membership_claims
owners = var.owners
type = local.type
dynamic "required_resource_access" {
......
......@@ -53,6 +53,12 @@ variable "group_membership_claims" {
description = "Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects."
}
variable "owners" {
type = list(string)
default = []
description = "Azure AD Object IDs that will be granted ownership of the application"
}
variable "password" {
type = string
default = ""
......
......@@ -326,6 +326,11 @@ module "ad_application" {
]
}
]
owners = [
data.azurerm_client_config.current.object_id,
var.principal_objectId
]
}
......
#-------------------------------
# AD Service Principal
#-------------------------------
resource "azuread_service_principal" "ad_app_sp" {
application_id = module.ad_application.id
}
......@@ -49,7 +49,7 @@ func TestTemplate(t *testing.T) {
TfOptions: tfOptions,
Workspace: workspace,
PlanAssertions: nil,
ExpectedResourceCount: 59,
ExpectedResourceCount: 60,
ExpectedResourceAttributeValues: resourceDescription,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment