MCPcopy Index your code
hub / github.com/coder/coder / AgentScriptEnv

Function AgentScriptEnv

provisionersdk/agent.go:45–54  ·  view source on GitHub ↗

AgentScriptEnv returns a key-pair of scripts that are consumed by the Coder Terraform Provider. https://github.com/coder/terraform-provider-coder/blob/main/provider/agent.go (updateInitScript) performs additional string substitutions.

()

Source from the content-addressed store, hash-verified

43// https://github.com/coder/terraform-provider-coder/blob/main/provider/agent.go (updateInitScript)
44// performs additional string substitutions.
45func AgentScriptEnv() map[string]string {
46 env := map[string]string{}
47 for operatingSystem, scripts := range agentScripts {
48 for architecture, script := range scripts {
49 script := strings.ReplaceAll(script, "${ARCH}", architecture)
50 env[fmt.Sprintf("CODER_AGENT_SCRIPT_%s_%s", operatingSystem, architecture)] = script
51 }
52 }
53 return env
54}
55
56// DefaultDisplayApps returns the default display applications to enable
57// if none are specified in a template.

Callers 3

initScriptMethod · 0.92
serveScriptFunction · 0.92
provisionEnvFunction · 0.92

Calls

no outgoing calls

Tested by 1

serveScriptFunction · 0.74