-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
terraform plan fails with ARM_name environment variables. #8444
Comments
terraform plan
fails with ARM_name
environment variables.
hi @changeworld Are these credentials correct? How did you generate them? We have a guide here that we have tested extensively for successful generation
This part of the error suggests that the credentials have been read successfully but are not working as expected Thanks Paul |
Hi @stack72
correct. TF_VAR_subscription_id value = ARM_SUBSCRIPTION_ID value, TF_VAR_client_id value = ARM_CLIENT_ID value, other values too.
Here's
Hmm .....
There is no
When there is no environment variables and input values, the above error will occur. Thanks |
Hi, << Configure the Microsoft Azure Providerprovider "azurerm" { create a resource groupresource "azurerm_resource_group" "terra-test" { The above credentials are right. Because from the CLI i have tried to change the ownership of the service principal. It worked fine. << Command used >> ubuntu@salt:~/TERRAFORM/azure$ azure role assignment create --objectId 123456666 -o Reader -c /subscriptions/3122w2a33qrq/ info: role assignment create command OK ubuntu@salt:~/TERRAFORM/azure$ azure account show -s 3122w2a33qrq info: account show command OK ubuntu@salt: Please take a look. And suggest something. |
Hi @vikash009 and @changeworld Please can you tell me if your credentials allow you to run the following command:
That will tell you if your credentials are correct P. |
I run the following command:
|
Thanks for the confirmation - I notice that you are on a version of Terraform quite a few releases back. I am sure this bug won't still be there in the latest version I personally run the tests with ARM_ env vars and so does our acceptance test framework Please let me know how you get on Paul |
I run the following command:
|
Thanks for the reply. @paul I was able to run the following command. azure group create --name mytestrg --location westus After updating the terraform to latest and assigning one extra role On Wed, Nov 9, 2016 at 9:46 PM, Takashi Takebayashi <
|
Good to hear the issue is resolved. Closing please let us know if we missed anything. :) |
I have exactly the same issue: the error says however this is not listed in the Azure documentation |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
0.7.1
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
changeworld/terraform-azure@e085b90
Debug Output
No output.
Expected Behavior
Read environment variables.
Actual Behavior
Don't read environment variables.
Steps to Reproduce
In accordance with the following procedure
https://www.terraform.io/docs/providers/azurerm/
export ARM_SUBSCRIPTION_ID=azure_subscription_id
export ARM_CLIENT_ID=azure_client_id
export ARM_CLIENT_SECRET=azure_client_secret
export ARM_TENANT_ID=azure_tenant_id
terraform plan
=>Output
Credentials for acessing the Azure Resource Manager API are likely to be incorrect, or the service principal does not have permission to use the Azure Service Management API.
It works with the following procedure.
It might be described errors in the document.
export TF_VAR_subscription_id=azure_subscription_id
export TF_VAR_client_id=azure_client_id
export TF_VAR_client_secret=azure_client_secret
export TF_VAR_tenant_id=azure_tenant_id
terraform plan
The text was updated successfully, but these errors were encountered: