Skip to content

Commit 34deb09

Browse files
zedkippCoder Agents
andauthored
feat: remove coder_secret block extractor (#212)
Drops the parser, types, test fixtures, and Output.SecretRequirements field that landed in #198/#200. After this change preview no longer parses 'data "coder_secret"' blocks and Output.SecretRequirements is gone. This is being removed due to a change in direction for how secrets work in Coder (see https://linear.app/codercom/issue/PLAT-243). Co-authored-by: Coder Agents <agents@coder.com>
1 parent b4c3577 commit 34deb09

9 files changed

Lines changed: 18 additions & 530 deletions

File tree

extract/secret.go

Lines changed: 0 additions & 92 deletions
This file was deleted.

extract/secret_test.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

preview.go

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ type Output struct {
4040
// JSON marshalling is handled in the custom methods.
4141
ModuleOutput cty.Value `json:"-"`
4242

43-
Parameters []types.Parameter `json:"parameters"`
44-
WorkspaceTags types.TagBlocks `json:"workspace_tags"`
45-
Presets []types.Preset `json:"presets"`
46-
Variables []types.Variable `json:"variables"`
47-
SecretRequirements []types.SecretRequirement `json:"secret_requirements"`
43+
Parameters []types.Parameter `json:"parameters"`
44+
WorkspaceTags types.TagBlocks `json:"workspace_tags"`
45+
Presets []types.Preset `json:"presets"`
46+
Variables []types.Variable `json:"variables"`
4847
// Files is included for printing diagnostics.
4948
// They can be marshalled, but not unmarshalled. This is a limitation
5049
// of the HCL library.
@@ -280,20 +279,18 @@ func Preview(ctx context.Context, input Input, dir fs.FS) (output *Output, diagn
280279
preValidPresets := presets(modules, rp)
281280
tags, tagDiags := workspaceTags(modules, p.Files())
282281
vars := variables(modules)
283-
secretReqs, secretDiags := secrets(modules)
284282

285283
// Add warnings
286284
diags = diags.Extend(warnings(modules))
287285

288286
return &Output{
289-
ModuleOutput: outputs,
290-
Parameters: rp,
291-
WorkspaceTags: tags,
292-
Presets: preValidPresets,
293-
Files: p.Files(),
294-
Variables: vars,
295-
SecretRequirements: secretReqs,
296-
}, diags.Extend(overrideDiags).Extend(rpDiags).Extend(tagDiags).Extend(secretDiags)
287+
ModuleOutput: outputs,
288+
Parameters: rp,
289+
WorkspaceTags: tags,
290+
Presets: preValidPresets,
291+
Files: p.Files(),
292+
Variables: vars,
293+
}, diags.Extend(overrideDiags).Extend(rpDiags).Extend(tagDiags)
297294
}
298295

299296
func (i Input) RichParameterValue(key string) (string, bool) {

0 commit comments

Comments
 (0)