Skip to content

Commit 75a5d49

Browse files
committed
upgrade to v2
1 parent 414bacf commit 75a5d49

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

codersdk/richparameters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"golang.org/x/xerrors"
77

8-
"github.com/coder/terraform-provider-coder/provider"
8+
"github.com/coder/terraform-provider-coder/v2/provider"
99
)
1010

1111
func ValidateNewWorkspaceParameters(richParameters []TemplateVersionParameter, buildParameters []WorkspaceBuildParameter) error {

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ require (
9494
github.com/coder/quartz v0.1.2
9595
github.com/coder/retry v1.5.1
9696
github.com/coder/serpent v0.10.0
97-
github.com/coder/terraform-provider-coder v1.0.4
9897
github.com/coder/websocket v1.8.12
9998
github.com/coder/wgtunnel v0.1.13-0.20240522110300-ade90dfb2da0
10099
github.com/coreos/go-oidc/v3 v3.12.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ github.com/coder/tailscale v1.1.1-0.20250129014916-8086c871eae6 h1:prDIwUcsSEKbs
240240
github.com/coder/tailscale v1.1.1-0.20250129014916-8086c871eae6/go.mod h1:1ggFFdHTRjPRu9Yc1yA7nVHBYB50w9Ce7VIXNqcW6Ko=
241241
github.com/coder/terraform-config-inspect v0.0.0-20250107175719-6d06d90c630e h1:JNLPDi2P73laR1oAclY6jWzAbucf70ASAvf5mh2cME0=
242242
github.com/coder/terraform-config-inspect v0.0.0-20250107175719-6d06d90c630e/go.mod h1:Gz/z9Hbn+4KSp8A2FBtNszfLSdT2Tn/uAKGuVqqWmDI=
243-
github.com/coder/terraform-provider-coder v1.0.4 h1:MJldCvykIQzzqBVUDjCJpPyqvKelAAHrtJKfIIx4Qxo=
244-
github.com/coder/terraform-provider-coder v1.0.4/go.mod h1:dQ1e/IccUxnmh/1bXTA3PopSoBkHMyWT6EkdBw8Lx6Y=
245243
github.com/coder/terraform-provider-coder/v2 v2.1.3 h1:zB7ObGsiOGBHcJUUMmcSauEPlTWRIYmMYieF05LxHSc=
246244
github.com/coder/terraform-provider-coder/v2 v2.1.3/go.mod h1:RHGyb+ghiy8UpDAMJM8duRFuzd+1VqA3AtkRLh2P3Ug=
247245
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=

provisioner/terraform/provision.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"golang.org/x/xerrors"
1717

1818
"cdr.dev/slog"
19-
"github.com/coder/terraform-provider-coder/provider"
19+
"github.com/coder/terraform-provider-coder/v2/provider"
2020

2121
"github.com/coder/coder/v2/coderd/database"
2222
"github.com/coder/coder/v2/coderd/tracing"
@@ -269,7 +269,7 @@ func provisionEnv(
269269
env = append(env, provider.ParameterEnvironmentVariable(param.Name)+"="+param.Value)
270270
}
271271
for _, extAuth := range externalAuth {
272-
env = append(env, provider.GitAuthAccessTokenEnvironmentVariable(extAuth.Id)+"="+extAuth.AccessToken)
272+
env = append(env, gitAuthAccessTokenEnvironmentVariable(extAuth.Id)+"="+extAuth.AccessToken)
273273
env = append(env, provider.ExternalAuthAccessTokenEnvironmentVariable(extAuth.Id)+"="+extAuth.AccessToken)
274274
}
275275

@@ -350,3 +350,9 @@ func tryGettingCoderProviderStacktrace(sess *provisionersdk.Session) string {
350350
}
351351
return string(stacktraces)
352352
}
353+
354+
// gitAuthAccessTokenEnvironmentVariable was copied from provider.GitAuthAccessTokenEnvironmentVariable
355+
// in v1.0.4 of github.com/coder/terraform-provider-coder/provider when we upgraded to v2.
356+
func gitAuthAccessTokenEnvironmentVariable(id string) string {
357+
return fmt.Sprintf("CODER_GIT_AUTH_ACCESS_TOKEN_%s", id)
358+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy