Skip to content

Instantly share code, notes, and snippets.

@mdtusz
Last active January 11, 2022 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdtusz/315b6fd9d61f97485b349b359801c30f to your computer and use it in GitHub Desktop.
Save mdtusz/315b6fd9d61f97485b349b359801c30f to your computer and use it in GitHub Desktop.
When trying to retrieve the access token from the microsoft graph, the provider fails with a refused connection.
2022-01-11T12:34:26.880-0800 [INFO] provider.terraform-provider-azurerm_v2.87.0_x5: Testing if Service Principal / Client Certificate is applicable for Authentication..: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [INFO] provider.terraform-provider-azurerm_v2.87.0_x5: Testing if Multi Tenant Service Principal / Client Secret is applicable for Authentication..: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [INFO] provider.terraform-provider-azurerm_v2.87.0_x5: Testing if Service Principal / Client Secret is applicable for Authentication..: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [INFO] provider.terraform-provider-azurerm_v2.87.0_x5: Using Service Principal / Client Secret for Authentication: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [INFO] provider.terraform-provider-azurerm_v2.87.0_x5: Getting OAuth config for endpoint https://login.microsoftonline.com/ with tenant ********************: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [DEBUG] provider.terraform-provider-azurerm_v2.87.0_x5: GoAzureHelpers Request:
POST /********************/oauth2/token?api-version=1.0 HTTP/1.1
Host: login.microsoftonline.com
User-Agent: Go/go1.17.3 (amd64-linux) go-autorest/adal/v1.0.0
Content-Length: 169
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
client_id=******************&client_secret=*******************&grant_type=client_credentials&resource=https%3A%2F%2Fgraph.windows.net%2F: timestamp=2022-01-11T12:34:26.880-0800
2022-01-11T12:34:26.880-0800 [DEBUG] provider.terraform-provider-azurerm_v2.87.0_x5: GoAzureHelpers Response Error: Post "https://login.microsoftonline.com/a3e24c46-1717-4eca-8e77-7b9a54ea97ed/oauth2/token?api-version=1.0": dial tcp: lookup login.microsoftonline.com on [::1]:53: read udp [::1]:58744->[::1]:53: read: connection refused for https://login.microsoftonline.com/a3e24c46-1717-4eca-8e77-7b9a54ea97ed/oauth2/token?api-version=1.0: timestamp=2022-01-11T12:34:26.880-0800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment