You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is hard to predict those types tho. Because it can be anything.
I think we are not able to map all the Terraform resource types and even if we could, it can be a hundreds or thousands
What I made in this case was to map the most used ones based on user usage and we probably should update it time to time
In that case, it doesn't make sense to change them on the backend so closing this for now.
Problem
While working on #3754, I realized our types are a bit loose. On the frontend, we have a small set of possibilities listed here:
https://github.com/coder/coder/blob/main/site/src/components/Resources/ResourceAvatar.tsx#L16-L25
If this is the case, our generated types should use a union of strings instead of
string
. This will lead to safer codeSolution
Modify https://github.com/coder/coder/blob/main/codersdk/workspaceresources.go#L28 to be a limited subset of strings similar to what we do for
BuildReason
here:https://github.com/coder/coder/blob/main/codersdk/workspacebuilds.go#L22-L34
Checklist
The text was updated successfully, but these errors were encountered: