From 95277a294e80778ff8faede16d2ca39943a2457a Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 14 Apr 2025 09:57:46 +0000 Subject: [PATCH] chore: bump coder to v2.21.0 --- docs/data-sources/group.md | 1 - docs/data-sources/user.md | 1 - go.mod | 26 ++++---- go.sum | 66 +++++++++++-------- integration/integration_test.go | 2 +- internal/provider/group_data_source.go | 33 ++++------ internal/provider/group_data_source_test.go | 3 +- internal/provider/group_resource_test.go | 5 +- internal/provider/license_resource_test.go | 3 +- .../provider/organization_data_source_test.go | 3 +- .../provider/organization_resource_test.go | 3 +- ...rganization_sync_settings_resource_test.go | 3 +- .../provider/provisioner_key_resource_test.go | 3 +- .../provider/template_data_source_test.go | 3 +- internal/provider/template_resource_test.go | 8 +-- internal/provider/user_data_source.go | 6 -- internal/provider/user_data_source_test.go | 3 +- internal/provider/user_resource_test.go | 3 +- internal/provider/uuid_internal_test.go | 5 +- .../provider/workspace_proxy_resource_test.go | 5 +- 20 files changed, 83 insertions(+), 102 deletions(-) diff --git a/docs/data-sources/group.md b/docs/data-sources/group.md index 90dabe5..f06c55b 100644 --- a/docs/data-sources/group.md +++ b/docs/data-sources/group.md @@ -71,5 +71,4 @@ Read-Only: - `last_seen_at` (Number) Unix timestamp of when the member was last seen. - `login_type` (String) The login type of the member. Can be `oidc`, `token`, `password`, `github` or `none`. - `status` (String) The status of the member. Can be `active`, `dormant` or `suspended`. -- `theme_preference` (String) - `username` (String) diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index 969a26a..252db9e 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -53,4 +53,3 @@ resource "coderd_group" "bosses" { - `organization_ids` (Set of String) IDs of organizations the user is associated with. - `roles` (Set of String) Roles assigned to the user. Valid roles are `owner`, `template-admin`, `user-admin`, and `auditor`. - `suspended` (Boolean) Whether the user is suspended. -- `theme_preference` (String) The user's preferred theme. diff --git a/go.mod b/go.mod index 89ba773..074a54f 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,10 @@ module github.com/coder/terraform-provider-coderd -go 1.23.0 - -toolchain go1.24.1 +go 1.24.1 require ( cdr.dev/slog v1.6.2-0.20241112041820-0ec81e6e67bb - github.com/coder/coder/v2 v2.20.2 + github.com/coder/coder/v2 v2.21.0 github.com/docker/docker v28.0.4+incompatible github.com/docker/go-connections v0.5.0 github.com/google/uuid v1.6.0 @@ -58,13 +56,13 @@ require ( github.com/coder/serpent v0.10.0 // indirect github.com/coder/terraform-provider-coder/v2 v2.1.3 // indirect github.com/coder/websocket v1.8.12 // indirect - github.com/coreos/go-oidc/v3 v3.12.0 // indirect + github.com/coreos/go-oidc/v3 v3.13.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect - github.com/ebitengine/purego v0.6.0-alpha.5 // indirect + github.com/ebitengine/purego v0.8.2 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-chi/chi/v5 v5.1.0 // indirect @@ -144,7 +142,7 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.12.0 // indirect + github.com/spf13/afero v1.14.0 // indirect github.com/spf13/cast v1.7.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tinylib/msgp v1.2.1 // indirect @@ -180,21 +178,21 @@ require ( go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.36.0 // indirect golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect - golang.org/x/mod v0.23.0 // indirect + golang.org/x/mod v0.24.0 // indirect golang.org/x/net v0.37.0 // indirect - golang.org/x/oauth2 v0.26.0 // indirect + golang.org/x/oauth2 v0.28.0 // indirect golang.org/x/sync v0.12.0 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect golang.org/x/text v0.23.0 // indirect - golang.org/x/time v0.10.0 // indirect - golang.org/x/tools v0.30.0 // indirect + golang.org/x/time v0.11.0 // indirect + golang.org/x/tools v0.31.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 // indirect - google.golang.org/grpc v1.70.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect + google.golang.org/grpc v1.71.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/DataDog/dd-trace-go.v1 v1.72.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index f56bfca..a0cc8b3 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ cdr.dev/slog v1.6.2-0.20241112041820-0ec81e6e67bb h1:4MKA8lBQLnCqj2myJCb5Lzoa65y0tABO4gHrxuMdsCQ= cdr.dev/slog v1.6.2-0.20241112041820-0ec81e6e67bb/go.mod h1:NaoTA7KwopCrnaSb0JXTC0PTp/O/Y83Lndnq0OEV3ZQ= -cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= @@ -87,16 +87,22 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg= -github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo= -github.com/charmbracelet/x/ansi v0.4.5 h1:LqK4vwBNaXw2AyGIICa5/29Sbdq58GbGdFngSexTdRM= -github.com/charmbracelet/x/ansi v0.4.5/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= +github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= +github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= +github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= +github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= +github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/coder/coder/v2 v2.20.2 h1:4EX81UvhCPLQGsTgcY0DO6ZcF4zXJNTiq7qbj2FPIZU= -github.com/coder/coder/v2 v2.20.2/go.mod h1:C7cmyhyP2TfngN8E3rgikbM11VZn7wvC6J4JOFVCyuQ= +github.com/coder/coder/v2 v2.21.0 h1:2MfGpgJ1Pd1szkUK1xQ+JYcQEIBSRf2U1Eo1yV8dX5Q= +github.com/coder/coder/v2 v2.21.0/go.mod h1:QLX7sMgj72WylhO0Pyw/ld1W4hfXwIEbPMQXLbgnE3E= github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs= github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0/go.mod h1:5UuS2Ts+nTToAMeOjNlnHFkPahrtDkmpydBen/3wgZc= github.com/coder/serpent v0.10.0 h1:ofVk9FJXSek+SmL3yVE3GoArP83M+1tX+H7S4t8BSuM= @@ -107,8 +113,8 @@ github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NA github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/coreos/go-oidc/v3 v3.12.0 h1:sJk+8G2qq94rDI6ehZ71Bol3oUHy63qNYmkiSjrc/Jo= -github.com/coreos/go-oidc/v3 v3.12.0/go.mod h1:gE3LgjOgFoHi9a4ce4/tJczr0Ai2/BoDhf0r5lltWI0= +github.com/coreos/go-oidc/v3 v3.13.0 h1:M66zd0pcc5VxvBNM4pB331Wrsanby+QomQYjN8HamW8= +github.com/coreos/go-oidc/v3 v3.13.0/go.mod h1:HaZ3szPaZ0e4r6ebqvsLWlk2Tn+aejfmrfah6hnSYEU= github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -131,8 +137,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 h1:8EXxF+tCLqaVk8AOC29zl2mnhQjwyLxxOTuhUazWRsg= github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4/go.mod h1:I5sHm0Y0T1u5YjlyqC5GVArM7aNZRUYtTjmJ8mPJFds= -github.com/ebitengine/purego v0.6.0-alpha.5 h1:EYID3JOAdmQ4SNZYJHu9V6IqOeRQDBYxqKAg9PyoHFY= -github.com/ebitengine/purego v0.6.0-alpha.5/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -417,8 +423,8 @@ github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0 github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= +github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA= +github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= @@ -468,6 +474,8 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= @@ -526,8 +534,8 @@ go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.33.0 h1:Gs5VK9/WUJhNXZgn8MR6ITatvAmKeIuCtNbsP3JkNqU= -go.opentelemetry.io/otel/sdk/metric v1.33.0/go.mod h1:dL5ykHZmm1B1nVRk9dDjChwDmt81MjVp3gLkQRwKf/Q= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= @@ -556,8 +564,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -572,8 +580,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= -golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= +golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -631,8 +639,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= -golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= -golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -640,8 +648,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -655,15 +663,15 @@ google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA= google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 h1:2duwAxN2+k0xLNpjnHTXoMUgnv6VPSp5fiqTuwSxjmI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6/go.mod h1:8BS3B93F/U1juMFq9+EDk+qOT5CO1R9IzXxG3PTqiRk= -google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= -google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:iK2jbkWL86DXjEx0qiHcRE9dE4/Ahua5k6V8OWFb//c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= +google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/DataDog/dd-trace-go.v1 v1.72.1 h1:QG2HNpxe9H4WnztDYbdGQJL/5YIiiZ6xY1+wMuQ2c1w= gopkg.in/DataDog/dd-trace-go.v1 v1.72.1/go.mod h1:XqDhDqsLpThFnJc4z0FvAEItISIAUka+RHwmQ6EfN1U= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/integration/integration_test.go b/integration/integration_test.go index 2ed60eb..79834a8 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -36,7 +36,7 @@ func TestIntegration(t *testing.T) { } timeoutMins, err := strconv.Atoi(timeoutStr) require.NoError(t, err, "invalid value specified for timeout") - ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeoutMins)*time.Minute) + ctx, cancel := context.WithTimeout(t.Context(), time.Duration(timeoutMins)*time.Minute) t.Cleanup(cancel) tfrcPath := setupProvider(t) diff --git a/internal/provider/group_data_source.go b/internal/provider/group_data_source.go index 007abaa..9e3639f 100644 --- a/internal/provider/group_data_source.go +++ b/internal/provider/group_data_source.go @@ -40,14 +40,13 @@ type GroupDataSourceModel struct { } type Member struct { - ID UUID `tfsdk:"id"` - Username types.String `tfsdk:"username"` - Email types.String `tfsdk:"email"` - CreatedAt types.Int64 `tfsdk:"created_at"` - LastSeenAt types.Int64 `tfsdk:"last_seen_at"` - Status types.String `tfsdk:"status"` - LoginType types.String `tfsdk:"login_type"` - ThemePreference types.String `tfsdk:"theme_preference"` + ID UUID `tfsdk:"id"` + Username types.String `tfsdk:"username"` + Email types.String `tfsdk:"email"` + CreatedAt types.Int64 `tfsdk:"created_at"` + LastSeenAt types.Int64 `tfsdk:"last_seen_at"` + Status types.String `tfsdk:"status"` + LoginType types.String `tfsdk:"login_type"` } func (d *GroupDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { @@ -127,9 +126,6 @@ func (d *GroupDataSource) Schema(ctx context.Context, req datasource.SchemaReque MarkdownDescription: "The login type of the member. Can be `oidc`, `token`, `password`, `github` or `none`.", Computed: true, }, - "theme_preference": schema.StringAttribute{ - Computed: true, - }, // TODO: Upgrade requested user type if required }, }, @@ -217,14 +213,13 @@ func (d *GroupDataSource) Read(ctx context.Context, req datasource.ReadRequest, members := make([]Member, 0, len(group.Members)) for _, member := range group.Members { members = append(members, Member{ - ID: UUIDValue(member.ID), - Username: types.StringValue(member.Username), - Email: types.StringValue(member.Email), - CreatedAt: types.Int64Value(member.CreatedAt.Unix()), - LastSeenAt: types.Int64Value(member.LastSeenAt.Unix()), - Status: types.StringValue(string(member.Status)), - LoginType: types.StringValue(string(member.LoginType)), - ThemePreference: types.StringValue(member.ThemePreference), + ID: UUIDValue(member.ID), + Username: types.StringValue(member.Username), + Email: types.StringValue(member.Email), + CreatedAt: types.Int64Value(member.CreatedAt.Unix()), + LastSeenAt: types.Int64Value(member.LastSeenAt.Unix()), + Status: types.StringValue(string(member.Status)), + LoginType: types.StringValue(string(member.LoginType)), }) } data.Members = members diff --git a/internal/provider/group_data_source_test.go b/internal/provider/group_data_source_test.go index 6581343..3cd43f2 100644 --- a/internal/provider/group_data_source_test.go +++ b/internal/provider/group_data_source_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strings" @@ -20,7 +19,7 @@ func TestAccGroupDataSource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "group_data_acc", true) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/group_resource_test.go b/internal/provider/group_resource_test.go index 090e504..3c1b589 100644 --- a/internal/provider/group_resource_test.go +++ b/internal/provider/group_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strings" @@ -20,7 +19,7 @@ func TestAccGroupResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "group_acc", true) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) @@ -138,7 +137,7 @@ func TestAccGroupResourceAGPL(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "group_acc_agpl", false) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/license_resource_test.go b/internal/provider/license_resource_test.go index fe124cd..d9c8ffb 100644 --- a/internal/provider/license_resource_test.go +++ b/internal/provider/license_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "strings" "testing" @@ -17,7 +16,7 @@ func TestAccLicenseResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "license_acc", false) license := os.Getenv("CODER_ENTERPRISE_LICENSE") diff --git a/internal/provider/organization_data_source_test.go b/internal/provider/organization_data_source_test.go index 9eb9c86..1bedc4f 100644 --- a/internal/provider/organization_data_source_test.go +++ b/internal/provider/organization_data_source_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strings" @@ -20,7 +19,7 @@ func TestAccOrganizationDataSource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "org_data_acc", false) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/organization_resource_test.go b/internal/provider/organization_resource_test.go index 2249051..239f29d 100644 --- a/internal/provider/organization_resource_test.go +++ b/internal/provider/organization_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "strings" "testing" @@ -24,7 +23,7 @@ func TestAccOrganizationResource(t *testing.T) { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "organization_acc", true) _, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/organization_sync_settings_resource_test.go b/internal/provider/organization_sync_settings_resource_test.go index 0d55b71..ac7bf2a 100644 --- a/internal/provider/organization_sync_settings_resource_test.go +++ b/internal/provider/organization_sync_settings_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "strings" "testing" @@ -23,7 +22,7 @@ func TestAccOrganizationSyncSettingsResource(t *testing.T) { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "organization_sync_settings_acc", true) _, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/provisioner_key_resource_test.go b/internal/provider/provisioner_key_resource_test.go index 7b05568..3ca4757 100644 --- a/internal/provider/provisioner_key_resource_test.go +++ b/internal/provider/provisioner_key_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "strings" "testing" @@ -22,7 +21,7 @@ func TestAccProvisionerKeyResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "provisioner_key_acc", true) orgs, err := client.Organizations(ctx) require.NoError(t, err) diff --git a/internal/provider/template_data_source_test.go b/internal/provider/template_data_source_test.go index 564e12f..91f9368 100644 --- a/internal/provider/template_data_source_test.go +++ b/internal/provider/template_data_source_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strconv" @@ -24,7 +23,7 @@ func TestAccTemplateDataSource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "template_data_acc", true) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/template_resource_test.go b/internal/provider/template_resource_test.go index 4a7b4d5..f56ff3b 100644 --- a/internal/provider/template_resource_test.go +++ b/internal/provider/template_resource_test.go @@ -27,7 +27,7 @@ func TestAccTemplateResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "template_acc", false) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) @@ -642,7 +642,7 @@ func TestAccTemplateResourceEnterprise(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "template_resource_acc", true) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) @@ -819,7 +819,7 @@ func TestAccTemplateResourceAGPL(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "template_resource_agpl_acc", false) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) @@ -948,7 +948,7 @@ resource "coderd_template" "sample" { ] }` - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "template_resource_variables_acc", false) exTemplateOne := t.TempDir() diff --git a/internal/provider/user_data_source.go b/internal/provider/user_data_source.go index be367ea..d221a1e 100644 --- a/internal/provider/user_data_source.go +++ b/internal/provider/user_data_source.go @@ -41,7 +41,6 @@ type UserDataSourceModel struct { OrganizationIDs types.Set `tfsdk:"organization_ids"` CreatedAt types.Int64 `tfsdk:"created_at"` // Unix timestamp LastSeenAt types.Int64 `tfsdk:"last_seen_at"` - ThemePreference types.String `tfsdk:"theme_preference"` } func (d *UserDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { @@ -101,10 +100,6 @@ func (d *UserDataSource) Schema(ctx context.Context, req datasource.SchemaReques MarkdownDescription: "Unix timestamp of when the user was last seen.", Computed: true, }, - "theme_preference": schema.StringAttribute{ - MarkdownDescription: "The user's preferred theme.", - Computed: true, - }, }, } } @@ -188,7 +183,6 @@ func (d *UserDataSource) Read(ctx context.Context, req datasource.ReadRequest, r data.OrganizationIDs = types.SetValueMust(UUIDType, orgIDs) data.CreatedAt = types.Int64Value(user.CreatedAt.Unix()) data.LastSeenAt = types.Int64Value(user.LastSeenAt.Unix()) - data.ThemePreference = types.StringValue(user.ThemePreference) // Save data into Terraform state resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) diff --git a/internal/provider/user_data_source_test.go b/internal/provider/user_data_source_test.go index 695ae27..2890381 100644 --- a/internal/provider/user_data_source_test.go +++ b/internal/provider/user_data_source_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strings" @@ -20,7 +19,7 @@ func TestAccUserDataSource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "user_data_acc", false) firstUser, err := client.User(ctx, codersdk.Me) require.NoError(t, err) diff --git a/internal/provider/user_resource_test.go b/internal/provider/user_resource_test.go index dd515d9..d717bfa 100644 --- a/internal/provider/user_resource_test.go +++ b/internal/provider/user_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "strings" "testing" @@ -18,7 +17,7 @@ func TestAccUserResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "user_acc", false) cfg1 := testAccUserResourceConfig{ diff --git a/internal/provider/uuid_internal_test.go b/internal/provider/uuid_internal_test.go index ff9fd32..4b2fe05 100644 --- a/internal/provider/uuid_internal_test.go +++ b/internal/provider/uuid_internal_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "testing" "github.com/google/uuid" @@ -52,7 +51,7 @@ func TestUUIDTypeValueFromTerraform(t *testing.T) { t.Run(test.name, func(t *testing.T) { t.Parallel() - ctx := context.Background() + ctx := t.Context() actual, err := uuidType.ValueFromTerraform(UUIDType, ctx, test.input) require.NoError(t, err) require.Equal(t, test.expected, actual) @@ -86,7 +85,7 @@ func TestUUIDToStringValue(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - ctx := context.Background() + ctx := t.Context() s, _ := test.uuid.ToStringValue(ctx) require.Equal(t, test.expected, s) }) diff --git a/internal/provider/workspace_proxy_resource_test.go b/internal/provider/workspace_proxy_resource_test.go index 9626e83..cecad70 100644 --- a/internal/provider/workspace_proxy_resource_test.go +++ b/internal/provider/workspace_proxy_resource_test.go @@ -1,7 +1,6 @@ package provider import ( - "context" "os" "regexp" "strings" @@ -19,7 +18,7 @@ func TestAccWorkspaceProxyResource(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "ws_proxy_acc", true) cfg1 := testAccWorkspaceProxyResourceConfig{ @@ -61,7 +60,7 @@ func TestAccWorkspaceProxyResourceAGPL(t *testing.T) { if os.Getenv("TF_ACC") == "" { t.Skip("Acceptance tests are disabled.") } - ctx := context.Background() + ctx := t.Context() client := integration.StartCoder(ctx, t, "ws_proxy_acc_agpl", false) cfg1 := testAccWorkspaceProxyResourceConfig{