Open
Description
This is more of an unfortunate circumstance, but one where I don't think there is a workaround.
Terraform Version
Terraform v1.7.5
+ provider registry.terraform.io/coder/coder v0.20.1
Affected Resource(s)
coder_agent
Terraform Configuration Files
resource "coder_agent" "this" {
os = "linux"
arch = "amd64"
dir = "/home/coder"
metadata {
display_name = "CPU Usage"
key = "cpu_usage"
script = "coder stat cpu"
interval = 10
timeout = 1
order = 1
}
metadata {
display_name = "RAM Usage"
key = "ram_usage"
script = "coder stat mem"
interval = 10
timeout = 1
order = 2
}
metadata {
display_name = "Disk Usage"
key = "disk_usage"
script = "coder stat disk"
interval = 10
timeout = 1
order = 3
}
metadata {
display_name = "Uptime"
key = "uptime"
script = "uptime -p"
interval = 10
timeout = 1
order = 4
}
order = 1
}
Expected Behavior
The metadata contains the expected output.
Actual Behavior
If the ~/.bashrc
prints a message, for example an error message to stderr
, that message is included in the metadata. This is unexpected because it isn't strictly expected IMO that ~/.bashrc
is even sourced for the script invokation.
As far as I can tell there's no workaround other than to fix the ~/.bashrc
, which is unfortunate for administrators of the Coder template who have no control over the user's rc-file.
Metadata
Metadata
Assignees
Labels
No labels