Query current agent metadata from inside workspace #23086
andrewhamon
started this conversation in
Coder
Replies: 1 comment
|
hey there! I've been working on this and just wanted to get some clarification before I merge anything. I saw you opened this pull request, which attempted to match this API, returning a is including the workspace owner email still a requirement for you, and are you still hoping for this new endpoint? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I would like to read certain information, like
coder_envvars, outside the context of the coder agent (i.e. from other systemd daemons running in the workspace).We used to do this by using gcloud instance metadata which we can easily set from terraform, however when used with prebuilds, this causes a lengthy terraform update (10-20s) if any instance metadata is changing. That's not that much faster than a non-prebuild... and probably too slow to deal with the hassle of making our template compatible with prebuilds.
Unfortunately, there are two key pieces of information that I need which change during workspace claim:
So, my next best idea: what if I could query the coder control plane, instead of gcloud instance metadata?
To make this work, i would need something like the workspace agent metadata API, but with the following changes:
/meversion (otherwise, i'd still be stuck, because how do I determine the UUID of the current agent?)All reactions