Skip to content

Commit

Permalink
use single tenant app for workload identity in conditional access policy
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jul 13, 2023
1 parent cbf8254 commit 956a626
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,9 @@ resource "azuread_conditional_access_policy" "test" {

func (ConditionalAccessPolicyResource) clientApplicationsIncluded(data acceptance.TestData) string {
return fmt.Sprintf(`
data "azuread_client_config" "test" {}
data "azuread_service_principal" "test" {
display_name = "Terraform Acceptance Tests (Single Tenant)"
}
resource "azuread_conditional_access_policy" "test" {
display_name = "acctest-CONPOLICY-%[1]d"
Expand All @@ -663,7 +663,7 @@ resource "azuread_conditional_access_policy" "test" {
}
client_applications {
included_service_principals = [data.azuread_client_config.test.object_id]
included_service_principals = [data.azuread_service_principal.test.object_id]
}
users {
Expand All @@ -681,9 +681,9 @@ resource "azuread_conditional_access_policy" "test" {

func (ConditionalAccessPolicyResource) clientApplicationsExcluded(data acceptance.TestData) string {
return fmt.Sprintf(`
data "azuread_client_config" "test" {}
data "azuread_service_principal" "test" {
display_name = "Terraform Acceptance Tests (Single Tenant)"
}
resource "azuread_conditional_access_policy" "test" {
display_name = "acctest-CONPOLICY-%[1]d"
Expand All @@ -698,7 +698,7 @@ resource "azuread_conditional_access_policy" "test" {
client_applications {
included_service_principals = ["ServicePrincipalsInMyTenant"]
excluded_service_principals = [data.azuread_client_config.test.object_id]
excluded_service_principals = [data.azuread_service_principal.test.object_id]
}
users {
Expand Down

0 comments on commit 956a626

Please sign in to comment.