{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/10666","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/10666/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/10666/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/10666/events","html_url":"https://github.com/hashicorp/terraform/issues/10666","id":194926442,"number":10666,"title":"Azure Germany: Error refreshing token: invalid character '<' looking for beginning of value.","user":{"login":"StefanScherer","id":207759,"avatar_url":"https://avatars.githubusercontent.com/u/207759?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanScherer","html_url":"https://github.com/StefanScherer","followers_url":"https://api.github.com/users/StefanScherer/followers","following_url":"https://api.github.com/users/StefanScherer/following{/other_user}","gists_url":"https://api.github.com/users/StefanScherer/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanScherer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanScherer/subscriptions","organizations_url":"https://api.github.com/users/StefanScherer/orgs","repos_url":"https://api.github.com/users/StefanScherer/repos","events_url":"https://api.github.com/users/StefanScherer/events{/privacy}","received_events_url":"https://api.github.com/users/StefanScherer/received_events","type":"User","site_admin":false},"labels":[{"id":85946957,"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":300462892,"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/azurerm","name":"provider/azurerm","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-12T09:30:18Z","updated_at":"2016-12-22T06:57:06Z","closed_at":null,"body":"I tried terraform with my Azure Germany free trial, but have problems to make it work/login. I tried the same steps in global Azure and location `West Europe` instead of `Germany Central` without a problem.\r\n\r\n### Terraform Version\r\n```\r\n$ terraform -v\r\nTerraform v0.7.13\r\n```\r\n\r\n### Affected Resource(s)\r\nPlease list the resources as a list, for example:\r\n- azurerm\r\n- azurerm_resource_group\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\nvariable \"location\" { default = \"Germany Central\" }\r\n\r\nresource \"azurerm_resource_group\" \"test\" {\r\n  name     = \"HelloGermany\"\r\n  location = \"${var.location}\"\r\n}\r\n```\r\n\r\n### Debug Output\r\nGist: https://gist.github.com/StefanScherer/5da2a4b3c30f75a8cc6629c1c354cd6c\r\n\r\n### Panic Output\r\nIf Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.\r\n\r\n### Expected Behavior\r\nWhat should have happened?\r\n\r\nIt should work like in public Azure:\r\n\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\nazurerm_resource_group.test: Refreshing state... (ID: /subscriptions/guid/resourceGroups/HelloWorld)\r\n\r\nThe Terraform execution plan has been generated and is shown below.\r\nResources are shown in alphabetical order for quick scanning. Green resources\r\nwill be created (or destroyed and then created if an existing resource\r\nexists), yellow resources are being changed in-place, and red resources\r\nwill be destroyed. Cyan entries are data sources to be read.\r\n\r\nNote: You didn't specify an \"-out\" parameter to save this plan, so when\r\n\"apply\" is called, Terraform can't guarantee this is what will execute.\r\n\r\n- azurerm_resource_group.test\r\n\r\n+ azurerm_resource_group.test\r\n    location: \"germanycentral\"\r\n    name:     \"HelloGermany\"\r\n    tags.%:   \"<computed>\"\r\n\r\n\r\nPlan: 1 to add, 0 to change, 1 to destroy.\r\n```\r\n### Actual Behavior\r\nWhat actually happened?\r\n\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* Cannot request provider registration for Azure Resource Manager: Error obtaining authorization token: Error refreshing token: invalid character '<' looking for beginning of value.\r\n```\r\n\r\n### Steps to Reproduce\r\n1. Create a free trial for Azure Germany https://azure.microsoft.com/en-us/free/germany/\r\n2. Create credentials in portal as described in https://www.terraform.io/docs/providers/azurerm/\r\n3. fetch german locations with `azure location list`, found `Germany Central` and `Germany Northeast`\r\n3. `terraform plan`\r\n\r\n### Important Factoids\r\nAzure Germany\r\n\r\n### References\r\nAre there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:\r\n- pull request #9765\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/268732135","html_url":"https://github.com/hashicorp/terraform/issues/10666#issuecomment-268732135","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/10666","id":268732135,"user":{"login":"StefanScherer","id":207759,"avatar_url":"https://avatars.githubusercontent.com/u/207759?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanScherer","html_url":"https://github.com/StefanScherer","followers_url":"https://api.github.com/users/StefanScherer/followers","following_url":"https://api.github.com/users/StefanScherer/following{/other_user}","gists_url":"https://api.github.com/users/StefanScherer/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanScherer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanScherer/subscriptions","organizations_url":"https://api.github.com/users/StefanScherer/orgs","repos_url":"https://api.github.com/users/StefanScherer/repos","events_url":"https://api.github.com/users/StefanScherer/events{/privacy}","received_events_url":"https://api.github.com/users/StefanScherer/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T06:57:06Z","updated_at":"2016-12-22T06:57:06Z","body":"Yes, still failing, both with 0.8.1 and 0.8.2.\r\n\r\nI've put Fiddler in between\r\n\r\nLogin request:\r\n```\r\nGET https://login.microsoftonline.de/ARM_TENANT_ID/OAuth2/authorize?client_id=ARM_CLIENT_ID&resource=https%3a%2f%2fmanagement.azure.com%2f&api-version=1.0&redirect_uri=https%3a%2f%2flogin.microsoftonline.com%2fARM_TENANT_ID%2fNationalCloudFederation&state=SOME_RAW_DATA&response_mode=form_post HTTP/1.1\r\nHost: login.microsoftonline.de\r\nUser-Agent: Go-http-client/1.1\r\nReferer: https://login.microsoftonline.com/ARM_TENANT_ID/oauth2/token?api-version=1.0\r\nAccept-Encoding: gzip\r\nConnection: close\r\n```\r\n\r\nLogin response is a HTML page:\r\n\r\n```\r\nHTTP/1.1 200 OK\r\nCache-Control: no-cache, no-store\r\nPragma: no-cache\r\nContent-Type: text/html; charset=utf-8\r\nExpires: -1\r\nVary: Accept-Encoding\r\nServer: Microsoft-IIS/8.5\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nx-ms-request-id: SOME_UUID\r\nP3P: CP=\"DSP CUR OTPi IND OTRi ONL FIN\"\r\nSet-Cookie: buid=RAW_DATA\r\nSet-Cookie: esctx=RAW_DATA\r\nX-Powered-By: ASP.NET\r\nDate: Thu, 22 Dec 2016 06:40:08 GMT\r\nConnection: close\r\n...\r\n```\r\n\r\nI think the problem are the ressource=management.azure.com and resource_uri=login.microsoftonline.com as the german azure cloud does not communicate with the public azure cloud.\r\n"}}
{"actor":{"display_login":"StefanScherer"}}