Skip to content

Commit f983340

Browse files
committed
Add support to create cli driven workflow workspaces
1 parent 6de5199 commit f983340

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

internal/provider/workspace_cli_resource.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ func (r *WorkspaceCliResource) Delete(ctx context.Context, req resource.DeleteRe
341341

342342
ll := len(chars)
343343
b := make([]byte, 4)
344-
rand.Read(b)
344+
345+
if _, err := rand.Read(b); err != nil {
346+
resp.Diagnostics.AddError("Error generating random string to delete workspace", fmt.Sprintf("Error generating random string to delete workspace: %s", err))
347+
return
348+
}
349+
345350
for i := 0; i < 4; i++ {
346351
b[i] = chars[int(b[i])%ll]
347352
}

terraform-provider-terrakube

20.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)