diff --git a/docs/resources/agent.md b/docs/resources/agent.md index 4c24e244..1cb9c605 100644 --- a/docs/resources/agent.md +++ b/docs/resources/agent.md @@ -47,9 +47,11 @@ resource "kubernetes_pod" "dev" { ### Optional - `auth` (String) The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity". +- `connection_timeout` (Number) Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. - `dir` (String) The starting directory when a user creates a shell session. Defaults to $HOME. - `env` (Map of String) A mapping of environment variables to set inside the workspace. - `startup_script` (String) A script to run after the agent starts. +- `troubleshooting_url` (String) A URL to a document with instructions for troubleshooting problems with the agent. ### Read-Only diff --git a/provider/agent.go b/provider/agent.go index 054ca8c6..5bf4588b 100644 --- a/provider/agent.go +++ b/provider/agent.go @@ -88,6 +88,19 @@ func agentResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "connection_timeout": { + Type: schema.TypeInt, + Default: 120, + ForceNew: true, + Optional: true, + Description: "Time in seconds until the agent is marked as timed out when a connection with the server cannot be established.", + }, + "troubleshooting_url": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Description: "A URL to a document with instructions for troubleshooting problems with the agent.", + }, }, } } diff --git a/provider/agent_test.go b/provider/agent_test.go index 8becbc44..88075462 100644 --- a/provider/agent_test.go +++ b/provider/agent_test.go @@ -31,6 +31,7 @@ func TestAgent(t *testing.T) { hi = "test" } startup_script = "echo test" + troubleshooting_url = "https://example.com/troubleshoot" } `, Check: func(state *terraform.State) error { @@ -46,6 +47,8 @@ func TestAgent(t *testing.T) { "dir", "env.hi", "startup_script", + "connection_timeout", + "troubleshooting_url", } { value := resource.Primary.Attributes[key] t.Logf("%q = %q", key, value)