Skip to content

Create a custom Terraform Plugin Framework UUID type #36

Closed
@ethanndickson

Description

@ethanndickson

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions