Skip to content

Commit bf8e5d0

Browse files
committed
feat: remove types check
1 parent ab53274 commit bf8e5d0

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

provider/workspace_owner.go

-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ package provider
33
import (
44
"context"
55
"encoding/json"
6-
"errors"
76
"os"
8-
"slices"
97
"strings"
108

119
"github.com/google/uuid"
@@ -55,12 +53,7 @@ func workspaceOwnerDataSource() *schema.Resource {
5553
_ = rd.Set("session_token", os.Getenv("CODER_WORKSPACE_OWNER_SESSION_TOKEN"))
5654
_ = rd.Set("oidc_access_token", os.Getenv("CODER_WORKSPACE_OWNER_OIDC_ACCESS_TOKEN"))
5755

58-
types := []string{"password", "github", "oidc", "none"}
5956
if login_type := os.Getenv("CODER_WORKSPACE_OWNER_LOGIN_TYPE"); login_type != "" {
60-
if !slices.Contains(types, login_type) {
61-
errorMessage := "invalid login type: %s, the valid types are: 'password, github, oidc, or none'"
62-
return diag.Errorf(errorMessage, errors.New(errorMessage))
63-
}
6457
_ = rd.Set("login_type", login_type)
6558
} else {
6659
_ = rd.Set("login_type", "none")

0 commit comments

Comments
 (0)