mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: Expose managed variables via API (#6134)
* WIP * hcl * useManagedVariables * fix * Fix * Fix * fix * go:build * Fix * fix: bool flag * Insert template variables * API * fix * Expose via API * More wiring * CLI for testing purposes * WIP * Delete FIXME * planVars * WIP * WIP * UserVariableValues * no dry run * Dry run * Done FIXME * Fix * Fix: CLI * Fix: migration * API tests * Test info * Tests * More tests * fix: lint * Fix: authz * Address PR comments * Fix * fix * fix
This commit is contained in:
@ -0,0 +1 @@
|
||||
DROP TABLE template_version_variables;
|
@ -0,0 +1,19 @@
|
||||
CREATE TABLE IF NOT EXISTS template_version_variables (
|
||||
template_version_id uuid not null references template_versions (id) on delete cascade,
|
||||
name text not null,
|
||||
description text not null,
|
||||
type text not null,
|
||||
value text not null,
|
||||
default_value text not null,
|
||||
required boolean not null,
|
||||
sensitive boolean not null,
|
||||
unique (template_version_id, name)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN template_version_variables.name IS 'Variable name';
|
||||
COMMENT ON COLUMN template_version_variables.description IS 'Variable description';
|
||||
COMMENT ON COLUMN template_version_variables.type IS 'Variable type';
|
||||
COMMENT ON COLUMN template_version_variables.value IS 'Variable value';
|
||||
COMMENT ON COLUMN template_version_variables.default_value IS 'Variable default value';
|
||||
COMMENT ON COLUMN template_version_variables.required IS 'Required variables needs a default value or a value provided by template admin';
|
||||
COMMENT ON COLUMN template_version_variables.sensitive IS 'Sensitive variables have their values redacted in logs or site UI';
|
@ -241,6 +241,7 @@ func TestMigrateUpWithFixtures(t *testing.T) {
|
||||
"replicas",
|
||||
"template_version_parameters",
|
||||
"workspace_build_parameters",
|
||||
"template_version_variables",
|
||||
}
|
||||
s := &tableStats{s: make(map[string]int)}
|
||||
|
||||
|
Reference in New Issue
Block a user