-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add coderd_workspace_proxy resource #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add coderd_workspace_proxy resource #53
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ethanndickson and the rest of your teammates on |
ID: data.ID.ValueUUID(), | ||
Name: data.Name.ValueString(), | ||
DisplayName: data.DisplayName.ValueString(), | ||
Icon: data.Icon.ValueString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we need a way to populate the session token field during Read
for imports, so we do a redundant Patch
. One improvement would be to modify codersdk
and make the other fields on PatchWorkspaceProxy
optional.
Name: data.Name.ValueString(), | ||
DisplayName: data.DisplayName.ValueString(), | ||
Icon: data.Icon.ValueString(), | ||
RegenerateToken: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the old token invalid. There's no way to read the secret from the API except on create intentionally (it's like a password), so I'd rather we just blocked imports.
There still should be some way to regenerate the token on request, though. I'm not sure how to do that idiomatically in TF.
I also don't mind not allowing regeneration for now until we come up with a better solution. Admins can seamlessly add and remove wsproxies live from a deployment and DERP map updates will be pushed out to all tailnet clients within a minute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the token lasts forever, I think we're all good to just not allow regenerations and imports, at least for now.
Name: data.Name.ValueString(), | ||
DisplayName: data.DisplayName.ValueString(), | ||
Icon: data.Icon.ValueString(), | ||
RegenerateToken: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not regenerate without the user requesting it.
94f4be2
to
55c3559
Compare
Closes #4