Currently, we store UUIDs in Terraform resources & data sources as instances of types.String (basetypes.Stringtype). This is an issue as it means:
- We convert strings to UUIDs to call
codersdk functions that accept a UUID.
- We convert
codersdk returned UUIDs to strings to store them in Terraform resources/data sources.
- We have no guarantees that a non-null, non-unknown ID field stores a valid UUID.
We can fix this by implementing a Terraform Plugin Framework custom type, as per the documentation.