Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
johnstcn commentedon Jul 22, 2024
@ethanndickson can you provide more information and/or context on this issue please?
ethanndickson commentedon Jul 22, 2024
Apologies, fixed.