Skip to content

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

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jul 30, 2024

Closes #4

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ethanndickson and the rest of your teammates on Graphite Graphite

@ethanndickson ethanndickson marked this pull request as ready for review July 30, 2024 05:13
ID: data.ID.ValueUUID(),
Name: data.Name.ValueString(),
DisplayName: data.DisplayName.ValueString(),
Icon: data.Icon.ValueString(),
Copy link
Member Author

@ethanndickson ethanndickson Jul 30, 2024

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,
Copy link
Member

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.

Copy link
Member Author

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,
Copy link
Member

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.

@ethanndickson ethanndickson force-pushed the 07-30-feat_add_coderd_workspace_proxy_resource branch from 94f4be2 to 55c3559 Compare August 1, 2024 03:01
@ethanndickson ethanndickson merged commit 3209c04 into main Aug 1, 2024
13 checks passed
@ethanndickson ethanndickson deleted the 07-30-feat_add_coderd_workspace_proxy_resource branch August 7, 2024 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add workspace proxy management capability to coderd provider
2 participants