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

Skip to content

Commit 8ca3fa9

Browse files
authored
fix: use hardcoded "coder" user for AWS and Azure (#3625)
1 parent b101a6f commit 8ca3fa9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/templates/aws-linux/main.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ sudo shutdown -h now
138138
--//--
139139
EOT
140140

141-
# Ensure Coder username is a valid Linux username
142-
linux_user = lower(substr(data.coder_workspace.me.owner, 0, 32))
141+
linux_user = "coder" # Ensure this user/group does not exist in your VM image
143142

144143
}
145144

examples/templates/azure-linux/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ locals {
8989
prefix = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}"
9090

9191
userdata = templatefile("cloud-config.yaml.tftpl", {
92-
username = lower(substr(data.coder_workspace.me.owner, 0, 32))
92+
username = "coder" # Ensure this user/group does not exist in your VM image
9393
init_script = base64encode(coder_agent.main.init_script)
9494
hostname = lower(data.coder_workspace.me.name)
9595
})

0 commit comments

Comments
 (0)