terraform-aks-appgw-acr-keyvault-loganalytics
terraform-aks-appgw-acr-keyvault-loganalytics copied to clipboard
Error Terraform Paln
$ terraform plan var.app_name Application name. Use only lowercase letters and numbers
Enter a value: desenv
module.keyvault.data.azurerm_client_config.current: Reading... module.appgw.data.azurerm_subscription.current: Reading... module.aks.data.azurerm_client_config.current: Reading... data.azurerm_client_config.current: Reading... module.keyvault.data.azurerm_client_config.current: Read complete after 0s [id=2022-09-11 13:25:11.559314296 +0000 UTC] data.azurerm_client_config.current: Read complete after 0s [id=2022-09-11 13:25:11.565198157 +0000 UTC] module.aks.data.azurerm_client_config.current: Read complete after 0s [id=2022-09-11 13:25:11.564905746 +0000 UTC] module.appgw.data.azurerm_subscription.current: Read complete after 0s [id=/subscriptions/2136b187-9279-4d67-b731-57db797e3c5e] ╷ │ Error: expected "object_id" to be a valid UUID, got 2022-09-11 13:25:11.559314296 +0000 UTC │ │ with module.keyvault.azurerm_key_vault_access_policy.default_policy, │ on modules/key_vault/main.tf line 27, in resource "azurerm_key_vault_access_policy" "default_policy": │ 27: object_id = data.azurerm_client_config.current.id
I faced the same issue
resource "azurerm_key_vault_access_policy" "default_policy" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.object_id
secret_permissions = ["get"]
}