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.
()
| 43 | // https://github.com/coder/terraform-provider-coder/blob/main/provider/agent.go (updateInitScript) |
| 44 | // performs additional string substitutions. |
| 45 | func 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. |
no outgoing calls