mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add secret requirement contract to dynamic parameters (#24785)
Adds structured `secret_requirements` to dynamic parameter responses and enforces missing required secrets during workspace start. Stop, delete, and tag rendering paths skip secret requirement enforcement so unmet secrets do not prevent cleanup. The SDK, generated API docs/types, and backend render/resolver/wsbuilder tests are updated for the new contract.
This commit is contained in:
Generated
+34
-5
@@ -4557,17 +4557,26 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
"value": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"secret_requirements": [
|
||||
{
|
||||
"env": "string",
|
||||
"file": "string",
|
||||
"help_message": "string",
|
||||
"satisfied": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|---------------|---------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `diagnostics` | array of [codersdk.FriendlyDiagnostic](#codersdkfriendlydiagnostic) | false | | |
|
||||
| `id` | integer | false | | |
|
||||
| `parameters` | array of [codersdk.PreviewParameter](#codersdkpreviewparameter) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-----------------------|-------------------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `diagnostics` | array of [codersdk.FriendlyDiagnostic](#codersdkfriendlydiagnostic) | false | | |
|
||||
| `id` | integer | false | | |
|
||||
| `parameters` | array of [codersdk.PreviewParameter](#codersdkpreviewparameter) | false | | |
|
||||
| `secret_requirements` | array of [codersdk.SecretRequirementStatus](#codersdksecretrequirementstatus) | false | | |
|
||||
|
||||
## codersdk.Entitlement
|
||||
|
||||
@@ -8885,6 +8894,26 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
| `ssh_config_options` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
|
||||
## codersdk.SecretRequirementStatus
|
||||
|
||||
```json
|
||||
{
|
||||
"env": "string",
|
||||
"file": "string",
|
||||
"help_message": "string",
|
||||
"satisfied": true
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|----------------|---------|----------|--------------|-------------|
|
||||
| `env` | string | false | | |
|
||||
| `file` | string | false | | |
|
||||
| `help_message` | string | false | | |
|
||||
| `satisfied` | boolean | false | | |
|
||||
|
||||
## codersdk.ServerSentEvent
|
||||
|
||||
```json
|
||||
|
||||
Generated
+8
@@ -2802,6 +2802,14 @@ curl -X POST http://coder-server:8080/api/v2/templateversions/{templateversion}/
|
||||
"value": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"secret_requirements": [
|
||||
{
|
||||
"env": "string",
|
||||
"file": "string",
|
||||
"help_message": "string",
|
||||
"satisfied": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user