{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/8444","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/8444/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/8444/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/8444/events","html_url":"https://github.com/hashicorp/terraform/issues/8444","id":172932446,"number":8444,"title":"terraform plan fails with ARM_name environment variables.","user":{"login":"changeworld","id":1207985,"avatar_url":"https://avatars.githubusercontent.com/u/1207985?v=3","gravatar_id":"","url":"https://api.github.com/users/changeworld","html_url":"https://github.com/changeworld","followers_url":"https://api.github.com/users/changeworld/followers","following_url":"https://api.github.com/users/changeworld/following{/other_user}","gists_url":"https://api.github.com/users/changeworld/gists{/gist_id}","starred_url":"https://api.github.com/users/changeworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/changeworld/subscriptions","organizations_url":"https://api.github.com/users/changeworld/orgs","repos_url":"https://api.github.com/users/changeworld/repos","events_url":"https://api.github.com/users/changeworld/events{/privacy}","received_events_url":"https://api.github.com/users/changeworld/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/azurerm","name":"provider/azurerm","color":"bfdadc"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/waiting-response","name":"waiting-response","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-24T11:55:38Z","updated_at":"2016-08-24T15:40:08Z","closed_at":null,"body":"### Terraform Version\r\n\r\n0.7.1\r\n\r\n### Affected Resource(s)\r\n\r\nPlease list the resources as a list, for example:\r\n- azurerm_resource_group \r\n- azurerm_virtual_network \r\n\r\n### Terraform Configuration Files\r\n\r\nhttps://github.com/changeworld/terraform-azure/commit/e085b903ae1e8ca1d9f4d201121349f34c18fe01\r\n\r\n### Debug Output\r\n\r\nNo output.\r\n\r\n### Expected Behavior\r\n\r\nRead environment variables.\r\n\r\n### Actual Behavior\r\n\r\nDon't read environment variables.\r\n\r\n### Steps to Reproduce\r\n\r\nIn accordance with the following procedure\r\nhttps://www.terraform.io/docs/providers/azurerm/\r\n\r\n1. `export ARM_SUBSCRIPTION_ID=azure_subscription_id`  \r\n`export ARM_CLIENT_ID=azure_client_id`  \r\n`export ARM_CLIENT_SECRET=azure_client_secret`  \r\n`export ARM_TENANT_ID=azure_tenant_id`\r\n2. `terraform plan`  \r\n=>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.`\r\n\r\nIt works with the following procedure.\r\nIt might be described errors in the document.\r\n\r\n1. `export TF_VAL_subscription_id=azure_subscription_id`  \r\n`export TF_VAL_client_id=azure_client_id`  \r\n`export TF_VAL_client_secret=azure_client_secret`  \r\n`export TF_VAL_tenant_id=azure_tenant_id`\r\n2. `terraform plan`"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/242111030","html_url":"https://github.com/hashicorp/terraform/issues/8444#issuecomment-242111030","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/8444","id":242111030,"user":{"login":"changeworld","id":1207985,"avatar_url":"https://avatars.githubusercontent.com/u/1207985?v=3","gravatar_id":"","url":"https://api.github.com/users/changeworld","html_url":"https://github.com/changeworld","followers_url":"https://api.github.com/users/changeworld/followers","following_url":"https://api.github.com/users/changeworld/following{/other_user}","gists_url":"https://api.github.com/users/changeworld/gists{/gist_id}","starred_url":"https://api.github.com/users/changeworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/changeworld/subscriptions","organizations_url":"https://api.github.com/users/changeworld/orgs","repos_url":"https://api.github.com/users/changeworld/repos","events_url":"https://api.github.com/users/changeworld/events{/privacy}","received_events_url":"https://api.github.com/users/changeworld/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T15:40:08Z","updated_at":"2016-08-24T15:40:08Z","body":"Hi @changeworld\r\n\r\n> Are these credentials correct? \r\n\r\ncorrect. TF_VAL_subscription_id value = ARM_SUBSCRIPTION_ID value, TF_VAL_client_id value = ARM_CLIENT_ID value, other values too.\r\n\r\n> How did you generate them?\r\n\r\n[Here.](https://www.terraform.io/docs/providers/azurerm/)'s `Creating Credentials`.\r\n\r\n> This part of the error suggests that the credentials have been read successfully but are not working as expected\r\n\r\nHmm .....\r\n\r\n```\r\n$ ls -a\r\n.\t\t..\t\t.git\t\t.gitignore\tLICENSE\t\tREADME.md\tazure.tf\r\n$ env | grep ARM\r\n$ env | grep TF_VAL\r\n$ terraform -v\r\nTerraform v0.7.1\r\n\r\n```\r\nThere is no terraform.tfvars as described above, environment variables (`ARM_name` and `TF_VAL_name`) is also not set.\r\nBut.\r\n```\r\n$ terraform plan\r\nRefreshing Terraform state in-memory prior to plan...\r\nThe refreshed state will be used to calculate this plan, but\r\nwill not be persisted to local or remote state storage.\r\n\r\nError refreshing state: 1 error(s) occurred:\r\n\r\n* Credentials for acessing the Azure Resource Manager API are likely to be incorrect, or\r\n  the service principal does not have permission to use the Azure Service Management\r\n  API.\r\n```\r\nWhen there is no environment variables and input values, the above error will occur."}}
{"actor":{"display_login":"changeworld"}}