Zach
79735f2d45
feat: plumb user secrets through provisioner chain to terraform ( #24542 )
...
This change passes user secrets from coderd to the Terraform process at
workspace build time so the `data.coder_secret` data source in
terraform-provider-coder can resolve values at plan time.
Secrets traverse two proto hops: `provisionerdserver` fetches them
via`ListUserSecretsWithValues`, attaches them to
`AcquiredJob.WorkspaceBuild.user_secrets` on `provisionerd.proto`;
`runner.go` forwards into `PlanRequest.user_secrets` on
`provisioner.proto`; the Terraform provisioner encodes each as
`CODER_SECRET_ENV_<name>` or `CODER_SECRET_FILE_<hex(path)>` before
invoking `terraform plan`. Only plan requests carry secrets; apply runs
with `nil` because values are baked into plan state.
Fetch is gated on a workspace transitioning to start. stop and delete
transitions never carry secrets, so revoking or deleting a stored secret
cannot make a workspace unstoppable. DB errors on the fetch fail the job
outright rather than silently continuing with an empty secret set.
Note that user secrets will be stored in the workspace_builds table in
provisioner_state with other Terraform state (including other sensitive data).
2026-04-27 08:26:07 -06:00
..
2026-02-05 14:08:03 +02:00
2025-08-21 16:03:34 -04:00
2025-07-08 16:16:00 +00:00
2025-11-28 08:33:50 +02:00
2026-04-16 12:46:52 -04:00
2026-04-16 13:59:09 +02:00
2026-01-16 17:04:57 -09:00
2024-08-20 14:47:46 +10:00
2026-01-16 17:04:57 -09:00
2026-03-16 11:54:30 -06:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2024-04-02 10:02:30 -05:00
2024-04-01 09:19:26 -05:00
2024-04-01 09:19:26 -05:00
2024-04-02 10:02:30 -05:00
2024-04-01 09:19:26 -05:00
2024-04-01 09:19:26 -05:00
2026-04-01 15:55:32 +00:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2026-04-01 15:55:32 +00:00
2023-10-09 23:04:35 +00:00
2026-04-16 13:59:09 +02:00
2024-01-24 14:05:39 +00:00
2024-08-20 14:47:46 +10:00
2025-10-29 15:45:45 +00:00
2026-01-29 16:06:17 +01:00
2026-01-29 16:06:17 +01:00
2026-01-16 17:04:57 -09:00
2026-01-08 09:58:10 +00:00
2023-09-14 19:48:29 -05:00
2025-09-11 15:08:57 +02:00
2025-09-11 15:08:57 +02:00
2024-07-11 15:22:20 +02:00
2024-07-11 15:22:20 +02:00
2025-02-19 13:08:38 +00:00
2025-03-21 15:28:08 +00:00
2025-03-21 15:28:08 +00:00
2024-01-02 20:46:18 +02:00
2026-02-06 14:09:39 +11:00
2026-01-16 17:04:57 -09:00
2026-02-05 19:35:20 +11:00
2026-02-06 14:09:39 +11:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2026-03-21 16:58:45 -08:00
2024-09-17 10:22:20 -05:00
2025-04-04 14:04:20 -04:00
2026-01-16 17:04:57 -09:00
2024-09-17 10:22:20 -05:00
2026-01-16 17:04:57 -09:00
2024-09-17 14:08:33 -05:00
2026-01-14 09:47:50 -08:00
2026-01-14 09:47:50 -08:00
2026-01-14 09:47:50 -08:00
2026-01-14 09:47:50 -08:00
2024-09-17 10:22:20 -05:00
2025-02-24 05:38:17 +00:00
2023-12-08 10:01:13 -06:00
2025-01-20 17:24:22 +00:00
2025-01-27 16:26:56 +00:00
2025-01-27 16:26:56 +00:00
2026-04-10 09:50:11 -05:00
2026-04-10 09:50:11 -05:00
2025-03-10 12:28:06 +00:00
2025-08-21 16:03:34 -04:00
2026-04-27 08:26:07 -06:00
2025-05-19 16:05:39 +01:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2025-01-03 11:15:35 -06:00
2026-04-24 17:09:17 -04:00
2024-12-18 10:58:33 +00:00
2025-08-13 18:15:53 +01:00
2024-08-20 14:47:46 +10:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2026-04-16 09:44:34 -07:00
2026-04-16 09:44:34 -07:00
2026-04-16 09:44:34 -07:00
2026-04-16 09:44:34 -07:00
2026-04-16 09:44:34 -07:00
2026-04-15 14:16:49 -04:00
2024-03-20 13:14:43 -04:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2025-07-08 16:16:00 +00:00
2024-08-20 14:47:46 +10:00
2025-05-16 10:09:46 -04:00
2026-04-24 17:09:17 -04:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2026-01-12 15:16:59 +01:00
2026-01-16 17:04:57 -09:00
2024-03-25 15:14:27 +00:00
2026-04-22 17:21:28 +03:00
2026-02-17 16:24:13 +00:00
2025-11-25 13:50:22 +00:00
2026-01-16 17:04:57 -09:00
2025-11-25 13:50:22 +00:00
2025-11-25 13:50:22 +00:00
2026-02-13 14:21:31 +00:00
2026-02-17 16:24:13 +00:00
2026-03-07 01:36:03 +00:00
2025-11-25 13:50:22 +00:00
2025-07-24 16:44:36 +01:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2026-04-23 08:24:03 +01:00
2024-08-20 14:47:46 +10:00
2025-07-24 16:44:36 +01:00
2025-07-29 16:59:26 +01:00
2026-01-16 17:04:57 -09:00
2026-01-16 17:04:57 -09:00
2024-10-17 14:15:14 +05:00
2026-01-16 17:04:57 -09:00
2026-02-18 16:47:45 +11:00
2024-10-17 14:15:14 +05:00
2026-01-16 17:04:57 -09:00
2026-02-17 13:16:46 +00:00
2025-10-28 15:15:57 +00:00
2026-02-17 13:16:46 +00:00
2026-02-17 13:16:46 +00:00
2025-10-27 17:07:25 +01:00
2024-01-24 14:05:39 +00:00
2026-04-24 17:09:17 -04:00
2026-03-18 22:10:04 +00:00
2024-08-20 14:47:46 +10:00
2026-03-17 14:07:20 -08:00
2023-10-09 11:47:57 -05:00
2026-01-16 17:04:57 -09:00
2025-10-22 16:18:31 +11:00
2026-03-26 10:36:40 +00:00
2024-12-20 00:06:22 +02:00
2026-03-18 22:10:04 +00:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2025-09-26 11:20:25 +01:00
2026-04-15 14:16:49 -04:00