Skip to content
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

azurerm_client_config service_principal_application_id and service_principal_object_id are empty #4353

Closed
raffertyuy opened this issue Sep 18, 2019 · 3 comments

Comments

@raffertyuy
Copy link

raffertyuy commented Sep 18, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.12.9

  • provider.azuread v0.6.0
  • provider.azurerm v1.33.1
  • provider.random v2.2.0

Affected Resource(s)

  • azurerm_client_config

Terraform Configuration Files

provider "azurerm" {
    version = "=1.33.1"
}

data "azurerm_client_config" "current" {}

output "cli_terraform_tenant_id" {
    value = "${data.azurerm_client_config.current.tenant_id}"
    description = "The tenant id used by this cli"
}

output "cli_terraform_client_id" {
    value = "${data.azurerm_client_config.current.client_id}"
    description = "The client id used by this cli"
}

output "cli_terraform_service_principal_application_id" {
    value = "${data.azurerm_client_config.current.service_principal_application_id}"
    description = "The service principal application id used by this cli"
}

output "cli_terraform_service_principal_object_id" {
    value = "${data.azurerm_client_config.current.service_principal_object_id}"
    description = "The service principal object id used by this cli"
}

Debug Output


Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

cli_terraform_client_id = 04b07795-8ddb-461a-bbee-02f9e1bf7b46
cli_terraform_service_principal_application_id =
cli_terraform_service_principal_object_id =
cli_terraform_tenant_id = 295be6d3-5142-4f3a-947b-6f07630a6456

Expected Behavior

application_id and object_id should have values

Actual Behavior

application_id and object_id have blank values

Steps to Reproduce

  1. copy paste the code above
  2. terraform apply

Important Factoids

Azure Public

References

@StefanSchoof
Copy link
Contributor

I think this is the docomented behavior: https://www.terraform.io/docs/providers/azurerm/d/client_config.html#service_principal_application_id

There is a feature request to change this: #3234

@tombuildsstuff
Copy link
Contributor

hi @raffertyuy

Thanks for opening this issue.

This behaviour is currently intentional since the mechanism for obtaining these is different - but as @StefanSchoof has mentioned there's an issue open tracking merging these Service Principal/User specific fields (in this case object_id, but we'll fix them all at the same time) into one in #3234 - as such I'm going to close this issue in favour of #3234, would you mind subscribing to that issue for updates?

Thanks!

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants