We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63b952e commit 6de7d91Copy full SHA for 6de7d91
provider/workspace.go
@@ -62,10 +62,7 @@ func workspaceDataSource() *schema.Resource {
62
id := helpers.OptionalEnvOrDefault("CODER_WORKSPACE_ID", uuid.NewString())
63
rd.SetId(id)
64
65
- templateID, err := helpers.RequireEnv("CODER_WORKSPACE_TEMPLATE_ID")
66
- if err != nil {
67
- return diag.Errorf("undefined env: %v", err)
68
- }
+ templateID := helpers.OptionalEnv("CODER_WORKSPACE_TEMPLATE_ID")
69
_ = rd.Set("template_id", templateID)
70
71
templateName, err := helpers.RequireEnv("CODER_WORKSPACE_TEMPLATE_NAME")
0 commit comments