Closed johnstcn closed 3 months ago
Is it related to #92?
Awesome, this is was I am waiting for since a while 🙏🏻
Thanks @mafredri @matifali for your excellent input and comments.
The overwhelming consensus here is to avoid a direct integration and instead allow injecting a Coder user's SSH private key into the envbuilder container. There should be no further changes in envbuilder required to support this. Closing this PR out in favour of https://github.com/coder/terraform-provider-coder/issues/219
Relates to https://github.com/coder/envbuilder/issues/31
Depends on https://github.com/coder/envbuilder/pull/173
Modifies the SSH logic introduced in https://github.com/coder/envbuilder/pull/170 with an extra step to fetch the SSH key from Coder.
There is currently a race condition between envbuilder starting and the workspace build being marked as 'completed'. To work around this, I added some backoff to fetching the SSH key using the agent token.
Demo:
https://github.com/coder/envbuilder/assets/4949514/986fc223-c50c-47dc-afc1-a251268cf0a0