feat: run a terraform plan before creating workspaces with the given template parameters (#1732)

This commit is contained in:
Dean Sheather
2022-06-02 00:44:53 +10:00
committed by GitHub
parent cc87a0cf6b
commit 6be8a373e0
22 changed files with 1422 additions and 218 deletions
+2 -1
View File
@@ -50,7 +50,8 @@ CREATE TYPE parameter_type_system AS ENUM (
CREATE TYPE provisioner_job_type AS ENUM (
'template_version_import',
'workspace_build'
'workspace_build',
'template_version_dry_run'
);
CREATE TYPE provisioner_storage_method AS ENUM (
@@ -0,0 +1,9 @@
-- It's not possible to drop enum values from enum types, so the UP has "IF NOT
-- EXISTS".
-- Delete all jobs that use the new enum value.
DELETE FROM
provisioner_jobs
WHERE
type = 'template_version_dry_run'
;
@@ -0,0 +1,2 @@
ALTER TYPE provisioner_job_type
ADD VALUE IF NOT EXISTS 'template_version_dry_run';
+1
View File
@@ -179,6 +179,7 @@ type ProvisionerJobType string
const (
ProvisionerJobTypeTemplateVersionImport ProvisionerJobType = "template_version_import"
ProvisionerJobTypeWorkspaceBuild ProvisionerJobType = "workspace_build"
ProvisionerJobTypeTemplateVersionDryRun ProvisionerJobType = "template_version_dry_run"
)
func (e *ProvisionerJobType) Scan(src interface{}) error {