-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
tenant_id expects a GUID but azurerm_client_config.current returns name #3359
Comments
Hi @alexstanhope, I'm sorry you are having this issue. Could you possible share with us your provider block or environment variables used while encountering this error? I ask because that resource only echos ethe exact information provided to the provider. So |
That must be my error then. I'm passing in the wrong value:
|
The Thanks! |
Since we've not heard back from you here I'm going to close this issue for the moment, but if you're still having issues please let us know and we'll take another look. Thanks! |
Thanks @tombuildsstuff Good timing. I just got around to testing it yesterday and you're right, I can confirm that with tenant_id set to a GUID it works correctly. The documentation is very clear, I just mistakenly read it out of an Azure Portal blade: |
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 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.13
Affected Resource(s)
azurerm_client_config
azurerm_key_vault
Terraform Configuration Files
This code snippet is taken from the first and only example in the AzureRM provider documentation:
https://www.terraform.io/docs/providers/azurerm/r/key_vault_key.html
Debug Output
Sorry, I only have this line so it's inlined here:
Expected Behavior
When running the example script, an azurerm_key_vault resource should be created.
Actual Behavior
The error message reports that it wasn't expecting an
m
character. That's because my Azure tenant name beginsm....onmicrosoft.com
.m
is not a hex character, which is why I'm pretty sure it's expecting a hex GUID. When I manually supply the Directory GUID (see below) it works.Steps to Reproduce
terraform apply
Important Factoids
https://www.terraform.io/docs/providers/azurerm/d/client_config.html
This error is created because
client_config
returns a tenant ID of the formtenantname.onmicrosoft.com
. but azurerm_key_vault.tenant_id is expecting a GUID, along the lines of the Directory GUID described in this SO question.References
The text was updated successfully, but these errors were encountered: