-
Notifications
You must be signed in to change notification settings - Fork 708
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
Error in function call - data.azurerm_client_config.current.object_id is "" #1173
Comments
There is a breaking change with az cli version 2.37.0. I have pushed a commit with the fix A new preview rover will be available shortly - https://github.com/aztfmod/rover/runs/6595897772?check_suite_focus=true |
Thank you, in this case I'm not using rover. I'm using the standalone module directly i.e.
|
@mgibson85 I have opened an issue on the provider.
|
Thanks @LaurentLesle, I've tried the command but it still fails: |
Do you have a variable called logged_user_objectId set in your root module?
You need to add and pass it through the caf module
…On Tue, 31 May 2022 at 17:32, mgibson85 ***@***.***> wrote:
Thanks @LaurentLesle <https://github.com/LaurentLesle>, I've tried the
command but it still fails:
[image: image]
<https://user-images.githubusercontent.com/12297674/171141980-4d20b779-f71c-4424-b202-7a9b6826fc13.png>
—
Reply to this email directly, view it on GitHub
<#1173 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABD4AEEWZXXCL7QHJH6PNY3VMXMBBANCNFSM5W4Q5YQA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you @LaurentLesle. If anyone needs a working example: main.tf:
terraform.auto.tfvars:
or (for powershell)
output:
|
HI @LaurentLesle, this issue appears to be fixed in the provider release 3.9.0 - hashicorp/terraform-provider-azurerm#16982. What's needed for the CAF module to be updated? |
Hi, can you provide a progress update on this fix? |
You need to use
This problem because CAF module uses old azurerm provider You can check @LaurentLesle Do you planned to upgrade |
Many thanks for the response @MrTolerant , this is certainly the way I'm currently working. I was curious when the update would take place to either remove the workaround of using |
hi folks, the problem is fixed after azurerm 3.9. For your testing purposes, you can use the following update branch: |
Hi,
I'm seeing an issue when running a previously working terraform plan
terraform plan data.azurerm_client_config.default: Reading... data.azurerm_client_config.default: Read complete after 0s [id=2022-05-25 06:46:07.818982 +0000 UTC] module.caf.data.azurerm_client_config.current: Reading... module.caf.data.azurerm_subscription.primary: Reading... module.caf.data.azurerm_client_config.current: Read complete after 0s [id=2022-05-25 06:46:08.4485897 +0000 UTC] module.caf.data.azurerm_subscription.primary: Read complete after 1s [id=/subscriptions/98952024-fc38-4f12-9934-9c8a9f46a943] ╷ │ Error: Error in function call │ │ on .terraform\modules\caf\locals.tf line 298, in locals: │ 298: object_id = coalesce(var.logged_user_objectId, var.logged_aad_app_objectId, try(data.azurerm_client_config.current.object_id, null), try(data.azuread_service_principal.logged_in_app.0.object_id, null)) │ ├──────────────── │ │ data.azuread_service_principal.logged_in_app is empty tuple │ │ data.azurerm_client_config.current.object_id is "" │ │ var.logged_aad_app_objectId is null │ │ var.logged_user_objectId is null │ │ Call to function "coalesce" failed: no non-null, non-empty-string arguments. ╵
I can confirm my session is logged in and can retrieve the account using az account show:
{ "environmentName": "AzureCloud", "homeTenantId": "########-bfe0-4f51-####-e96dd19548a1", "id": "########-fc38-4f12-####-9c8a9f46a943", "isDefault": true, "managedByTenants": [], "name": "Pay-As-You-Go", "state": "Enabled", "tenantId": "########-bfe0-4f51-####-e96dd19548a1", "user": { "name": "m365@######.onmicrosoft.com", "type": "user" } }
az version
{
"azure-cli": "2.37.0",
"azure-cli-core": "2.37.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {}
}
terraform version
Terraform v1.2.1
on windows_amd64
Please advise
Thanks,
Mark.
The text was updated successfully, but these errors were encountered: