mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add destroy to workspace provision job (#373)
* ci: Update DataDog GitHub branch to fallback to GITHUB_REF This was detecting branches, but not our "main" branch before. Hopefully this fixes it! * Add basic Terraform Provider * Rename post files to upload * Add tests for resources * Skip instance identity test * Add tests for ensuring agent get's passed through properly * Fix linting errors * Add echo path * Fix agent authentication * fix: Convert all jobs to use a common resource and agent type This enables a consistent API for project import and provisioned resources. * Add "coder_workspace" data source * feat: Remove magical parameters from being injected This is a much cleaner abstraction. Explicitly declaring the user parameters for each provisioner makes for significantly simpler testing. * feat: Add graceful exits to provisionerd Terraform (or other provisioners) may need to cleanup state, or cancel actions before exit. This adds the ability to gracefully exit provisionerd. * Fix cancel error check * feat: Add destroy to workspace provision job This enables the full flow of create/update/delete.
This commit is contained in:
@@ -693,6 +693,8 @@ func convertWorkspaceTransition(transition database.WorkspaceTransition) (sdkpro
|
||||
return sdkproto.WorkspaceTransition_START, nil
|
||||
case database.WorkspaceTransitionStop:
|
||||
return sdkproto.WorkspaceTransition_STOP, nil
|
||||
case database.WorkspaceTransitionDelete:
|
||||
return sdkproto.WorkspaceTransition_DESTROY, nil
|
||||
default:
|
||||
return 0, xerrors.Errorf("unrecognized transition: %q", transition)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user