You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7db8b17
Browse filesBrowse the repository at this point in the historyBrowse files
Lakshya Dangwal
authored and
Lakshya Dangwal
committed
Fix multiple issues:
- #503: Add 'name' attribute to coder_devcontainer to allow unique sub-agent names when using for_each/count
- #466: Add 'name' attribute to coder_agent to avoid duplicate agent name errors with for_each
- #517: Add 'coder_access_url' attribute to coder_agent to override the host/access URL
- #464: Add 'keyvalue' parameter type for Key=Value table input (env vars/secrets)
- #462: Allow number parameters without default by making 'optional' user-configurable
Description: "The name of the agent. When using `for_each` or `count`, this can be set to a unique value (e.g., `each.key`) to avoid name collisions. Defaults to the Terraform resource block name.",
88
+
ForceNew: true,
89
+
Optional: true,
90
+
ValidateFunc: validation.StringIsNotEmpty,
91
+
},
92
+
"coder_access_url": {
93
+
Type: schema.TypeString,
94
+
Description: "Override the Coder access URL that the agent uses to phone home. Useful for networking scenarios where the agent needs to connect via an internal DNS name instead of the public URL.",
95
+
ForceNew: true,
96
+
Optional: true,
97
+
ValidateFunc: validation.StringIsNotEmpty,
98
+
},
84
99
"api_key_scope": {
85
100
Type: schema.TypeString,
86
101
Optional: true,
@@ -491,7 +506,18 @@ func updateInitScript(resourceData *schema.ResourceData, i interface{}) diag.Dia
491
506
if!valid {
492
507
returndiag.Errorf("arch was unexpected type %q", reflect.TypeOf(resourceData.Get("arch")))
493
508
}
494
-
accessURL, err:=config.URL.Parse("/")
509
+
510
+
// Use custom coder_access_url if provided, otherwise use the provider config URL
Description: "The name of the sub-agent. When using `for_each` or `count`, this can be set to a unique value (e.g., `each.key`) to avoid name collisions. Defaults to the Terraform resource block name.",
32
+
ForceNew: true,
33
+
Optional: true,
34
+
ValidateFunc: validation.StringIsNotEmpty,
35
+
},
29
36
"agent_id": {
30
37
Type: schema.TypeString,
31
38
Description: "The `id` property of a `coder_agent` resource to associate with.",
Description: "Whether this value is optional. If set to true, the parameter does not require a default value and can be left empty during workspace creation.",
0 commit comments