From d3fff4c41aaee4245efd375963c4027b3514939e Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Mon, 18 Mar 2024 12:48:09 +0900 Subject: [PATCH] Fixed AzureAD deprecated warning --- example/main.tf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/example/main.tf b/example/main.tf index 41a7061..6ad2c6b 100644 --- a/example/main.tf +++ b/example/main.tf @@ -81,12 +81,15 @@ resource "azuread_application" "default" { } resource "azuread_service_principal" "default" { - application_id = azuread_application.default.application_id + client_id = azuread_application.default.client_id + owners = [data.azuread_client_config.current.object_id] + + app_role_assignment_required = false } resource "azuread_application_password" "default" { - application_object_id = azuread_application.default.object_id - end_date_relative = "8640h" + application_id = azuread_application.default.id + end_date_relative = "8640h" rotate_when_changed = { rotation = time_rotating.default.id @@ -139,7 +142,7 @@ module "keyvault_acmebot" { auth_settings = { enabled = true active_directory = { - client_id = azuread_application.default.application_id + client_id = azuread_application.default.client_id client_secret = azuread_application_password.default.value tenant_auth_endpoint = "https://login.microsoftonline.com/${data.azuread_client_config.current.tenant_id}/v2.0" } @@ -148,4 +151,4 @@ module "keyvault_acmebot" { output "principal_id" { value = module.keyvault_acmebot.principal_id -} \ No newline at end of file +}