Custom type support in Terraform
Blog post from Speakeasy
Terraform has introduced custom type support in Speakeasy-generated providers to enhance infrastructure management by enabling robust type handling. This feature uses the x-speakeasy-terraform-custom-type extension within the OpenAPI Specification to specify custom type implementations, allowing API providers to benefit from advanced validation and consistent data handling. The implementation supports various framework base types, offering a seamless integration with the terraform-plugin-framework's custom type system while retaining the simplicity of Speakeasy's SDK generation. Recent updates include replacing the Number type with Float64 for improved mapping between Terraform and Go SDK types, enhancing code conversion for primitive types, and refining variable naming for better readability. These enhancements aim to provide a balance between robust validation at the Terraform layer and efficient data handling in API integrations.