-
I'm using a cloudinit template, after I Restart or update the workspace (Proxmox VM) the coder agent never reconnects. I've found simular issues: #3485 #2970 Does the token change on every update? Or is it supposed to refresh itself?
The cloud init config: user_data = <<EOT
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
hostname: ${lower(data.coder_workspace.me.name)}
users:
- name: ${lower(data.coder_workspace.me.owner)}
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
cloud_final_modules:
- [scripts-user, always]
--//
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"
#!/bin/bash
export CODER_AGENT_TOKEN=${coder_agent.dev.token}
sudo --preserve-env=CODER_AGENT_TOKEN -u ${lower(data.coder_workspace.me.owner)} /bin/bash -c '${coder_agent.dev.init_script}'
--//--
EOT coder version: v0.25.0 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Same issue from my side. |
Beta Was this translation helpful? Give feedback.
-
My two cents |
Beta Was this translation helpful? Give feedback.
-
@fredsilvi I got it working using the other proxmox terraform provider and the two vm approach. here is my quick and dirty template: https://github.com/Toastyice/coder-proxmox |
Beta Was this translation helpful? Give feedback.
@fredsilvi I got it working using the other proxmox terraform provider and the two vm approach. here is my quick and dirty template: https://github.com/Toastyice/coder-proxmox
I'll close this issue as it was not a coder problem.