Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(azuread_application): add public_client #2025

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/standalone-azuread.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"azuread/105-azuread-application-with-optional-claims",
"azuread/106-azuread-application-with-api-scopes",
"azuread/108-azuread-application-with-app-roles",
"azuread/109-azuread-application-with-public-client",
"azuread/201-groups-and-roles"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ azuread_apps = {

azuread_applications = {
test_client_v1 = {
useprefix = true
application_name = "test-client-v1"
public_client = true
useprefix = true
application_name = "test-client-v1"
fallback_public_client_enabled = true

single_page_application = {
redirect_uris = [
Expand All @@ -55,4 +55,4 @@ azuread_applications = {
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
global_settings = {
default_region = "region1"
regions = {
region1 = "australiaeast"
}
random_length = 5
}

azuread_applications = {
test_client = {
useprefix = true
application_name = "test-client"
public_client = {
redirect_uris = ["http://localhost:8080"]
}
}
}
8 changes: 7 additions & 1 deletion modules/azuread/applications_v1/azuread_application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "azuread_application" "app" {
group_membership_claims = try(var.settings.group_membership_claims, ["All"])
identifier_uris = try(var.settings.identifier_uris, null)
prevent_duplicate_names = try(var.settings.prevent_duplicate_names, false)
fallback_public_client_enabled = try(var.settings.public_client, false)
fallback_public_client_enabled = try(var.settings.fallback_public_client_enabled, false)

dynamic "single_page_application" {
for_each = try(var.settings.single_page_application, null) != null ? [1] : []
Expand Down Expand Up @@ -123,6 +123,12 @@ resource "azuread_application" "app" {
}
}
}
dynamic "public_client" {
for_each = try(var.settings.public_client, null) != null ? [var.settings.public_client] : []
content {
redirect_uris = try(public_client.value.redirect_uris, null)
}
}
}

resource "random_uuid" "app_role_id" {
Expand Down