## Description Allow for devcontainer-cli module to prevent users from logging in until its finished running. ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [x ] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information **Path:** `registry/coder/modules/devcontainers-cli` **New version:** `1.1.0` **Breaking change:** [ ] Yes [x ] No ## Testing & Validation - [x] Tests pass (`bun test`) - [ ] Code formatted (`bun fmt`) - [ x] Changes tested locally ## Related Issues None --------- Co-authored-by: DevCats <chris@dualriver.com> Co-authored-by: DevCats <christofer@coder.com>
31 lines
795 B
HCL
31 lines
795 B
HCL
terraform {
|
|
required_version = ">= 1.0"
|
|
|
|
required_providers {
|
|
coder = {
|
|
source = "coder/coder"
|
|
version = ">= 0.17"
|
|
}
|
|
}
|
|
}
|
|
|
|
variable "agent_id" {
|
|
type = string
|
|
description = "The ID of a Coder agent."
|
|
}
|
|
|
|
variable "start_blocks_login" {
|
|
type = bool
|
|
default = false
|
|
description = "Boolean, This option determines whether users can log in immediately or must wait for the workspace to finish running this script upon startup."
|
|
}
|
|
|
|
resource "coder_script" "devcontainers-cli" {
|
|
agent_id = var.agent_id
|
|
display_name = "devcontainers-cli"
|
|
icon = "/icon/devcontainers.svg"
|
|
script = templatefile("${path.module}/run.sh", {})
|
|
run_on_start = true
|
|
start_blocks_login = var.start_blocks_login
|
|
}
|