Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/resources/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ resource "kubernetes_pod" "dev" {
- `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.
- `motd_file` (String) The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be /etc/motd.
- `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.

Expand Down
6 changes: 6 additions & 0 deletions provider/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ func agentResource() *schema.Resource {
Optional: true,
Description: "A URL to a document with instructions for troubleshooting problems with the agent.",
},
"motd_file": {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be /etc/motd.",
},
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions provider/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestAgent(t *testing.T) {
}
startup_script = "echo test"
troubleshooting_url = "https://example.com/troubleshoot"
motd_file = "/etc/motd"
}
`,
Check: func(state *terraform.State) error {
Expand All @@ -49,6 +50,7 @@ func TestAgent(t *testing.T) {
"startup_script",
"connection_timeout",
"troubleshooting_url",
"motd_file",
} {
value := resource.Primary.Attributes[key]
t.Logf("%q = %q", key, value)
Expand Down