Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98d1639

Browse files
committed
feat: Add connection_timeout and troubleshooting_url to agent
Related: coder/coder#4678
1 parent c474eba commit 98d1639

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

provider/agent.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ func agentResource() *schema.Resource {
8888
Type: schema.TypeString,
8989
Computed: true,
9090
},
91+
"connection_timeout": {
92+
Type: schema.TypeInt,
93+
Default: 120,
94+
ForceNew: true,
95+
Optional: true,
96+
Description: "Time in seconds until the agent is marked as timed out when a connection with the server cannot be established.",
97+
},
98+
"troubleshooting_url": {
99+
Type: schema.TypeString,
100+
ForceNew: true,
101+
Optional: true,
102+
Description: "A URL to a document with instructions for troubleshooting problems with the agent.",
103+
},
91104
},
92105
}
93106
}

provider/agent_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func TestAgent(t *testing.T) {
3131
hi = "test"
3232
}
3333
startup_script = "echo test"
34+
troubleshooting_url = "https://example.com/troubleshoot"
3435
}
3536
`,
3637
Check: func(state *terraform.State) error {
@@ -46,6 +47,8 @@ func TestAgent(t *testing.T) {
4647
"dir",
4748
"env.hi",
4849
"startup_script",
50+
"connection_timeout",
51+
"troubleshooting_url",
4952
} {
5053
value := resource.Primary.Attributes[key]
5154
t.Logf("%q = %q", key, value)

0 commit comments

Comments
 (0)