From 5257dc3d0437ed785a339bd3cd5d8285859d7dfa Mon Sep 17 00:00:00 2001 From: Mario Minardi Date: Wed, 25 Sep 2024 10:17:02 -0600 Subject: [PATCH] tailscale: pass base URL to OAuthConfig (#439) Pass the `parsedBaseURL` to `tsclient.OAuthConfig`. The base URL the OAuth client used for attempting to generate tokens was always the default URL previously which causes issues if the base URL for the provider and the rest of the tailscale client is set to something else. Fixes https://github.com/tailscale/terraform-provider-tailscale/issues/438 Signed-off-by: Mario Minardi --- tailscale/provider.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tailscale/provider.go b/tailscale/provider.go index 536a38f..1dbd962 100644 --- a/tailscale/provider.go +++ b/tailscale/provider.go @@ -162,6 +162,7 @@ func providerConfigure(_ context.Context, provider *schema.Provider, d *schema.R UserAgent: userAgent, Tailnet: tailnet, HTTP: tsclient.OAuthConfig{ + BaseURL: parsedBaseURL.String(), ClientID: oauthClientID, ClientSecret: oauthClientSecret, Scopes: oauthScopes,