From c0ea22f4eb4bf2c9280156f2c3fa80d1f8e85502 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Thu, 13 Jul 2023 01:48:28 +0100 Subject: [PATCH] use single tenant app for workload identity in conditional access policy --- .../conditional_access_policy_resource_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/services/conditionalaccess/conditional_access_policy_resource_test.go b/internal/services/conditionalaccess/conditional_access_policy_resource_test.go index c67ccc415a..298ed89480 100644 --- a/internal/services/conditionalaccess/conditional_access_policy_resource_test.go +++ b/internal/services/conditionalaccess/conditional_access_policy_resource_test.go @@ -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" @@ -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 { @@ -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" @@ -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 {