Skip to content

Commit ddc0e99

Browse files
authored
chore: remove coder_secret Terraform integration (#25512)
Removes the coder_secret Terraform integration: the data.coder_secret consumption path through provisionerdserver → provisioner.proto → provisioner/terraform, the dynamic-parameter secret-requirement validation, and the workspace-update / resolve-autostart surfaces that depended on it. This is being done due to a product/feature direction change (see PLAT-243). User-secret CRUD (DB, REST, CLI, UI, telemetry, audit) and the agent-manifest secret-injection path are untouched. The provisionerd API is bumped from v1.17 to v1.18 rather than rolled back: v1.17 shipped in v2.33.x, so user_secrets field numbers are reserved and the changelog documents both versions. Generated with assistance from Coder Agents.
1 parent 26a0805 commit ddc0e99

45 files changed

Lines changed: 834 additions & 3858 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cli/testdata/coder_provisioner_list_--output_json.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"last_seen_at": "====[timestamp]=====",
88
"name": "test-daemon",
99
"version": "v0.0.0-devel",
10-
"api_version": "1.17",
10+
"api_version": "1.18",
1111
"provisioners": [
1212
"echo"
1313
],

coderd/apidoc/docs.go

Lines changed: 1 addition & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 1 addition & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/autobuild/lifecycle_executor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ func (e *Executor) runOnce(t time.Time) Stats {
343343
SetLastWorkspaceBuildJobInTx(&latestJob).
344344
Experiments(e.experiments).
345345
Reason(reason).
346-
Logger(log.Named("wsbuilder")).
347346
BuildMetrics(e.workspaceBuilderMetrics)
348347
log.Debug(e.ctx, "auto building workspace", slog.F("transition", nextTransition))
349348
if nextTransition == database.WorkspaceTransitionStart &&

coderd/database/dbauthz/dbauthz.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ var (
246246
rbac.ResourceWorkspaceAgentDevcontainers.Type: {policy.ActionCreate},
247247
// Provisionerd creates usage events
248248
rbac.ResourceUsageEvent.Type: {policy.ActionCreate},
249-
rbac.ResourceUserSecret.Type: {policy.ActionRead},
250249
}),
251250
User: []rbac.Permission{},
252251
ByOrgID: map[string]rbac.OrgPermissions{},
@@ -271,7 +270,6 @@ var (
271270
rbac.ResourceTask.Type: {policy.ActionRead, policy.ActionUpdate},
272271
rbac.ResourceTemplate.Type: {policy.ActionRead, policy.ActionUpdate},
273272
rbac.ResourceUser.Type: {policy.ActionRead},
274-
rbac.ResourceUserSecret.Type: {policy.ActionRead},
275273
rbac.ResourceWorkspace.Type: {policy.ActionDelete, policy.ActionRead, policy.ActionUpdate, policy.ActionWorkspaceStart, policy.ActionWorkspaceStop},
276274
rbac.ResourceWorkspaceDormant.Type: {policy.ActionDelete, policy.ActionRead, policy.ActionUpdate, policy.ActionWorkspaceStop},
277275
}),

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6841,19 +6841,6 @@ func TestAuthorizeProvisionerJob_SystemFastPath(t *testing.T) {
68416841
})
68426842
}
68436843

6844-
func TestAsAutostart(t *testing.T) {
6845-
t.Parallel()
6846-
6847-
ctx := dbauthz.AsAutostart(context.Background())
6848-
actor, ok := dbauthz.ActorFromContext(ctx)
6849-
require.True(t, ok, "actor must be present")
6850-
6851-
auth := rbac.NewStrictCachingAuthorizer(prometheus.NewRegistry())
6852-
6853-
err := auth.Authorize(ctx, actor, policy.ActionRead, rbac.ResourceUserSecret.WithOwner(uuid.NewString()))
6854-
require.NoError(t, err, "user secret metadata read should be allowed")
6855-
}
6856-
68576844
func TestAsChatd(t *testing.T) {
68586845
t.Parallel()
68596846

0 commit comments

Comments
 (0)