Speakeasy Terraform Provider Support Matrix
Provider Components
Provider Components | Speakeasy Extension | Speakeasy Generation | Full Docs |
---|---|---|---|
Resource Schemas | x-speakeasy-entity-operation: MyEntity#create | Hoists and merges JSON schemas associated with all create, read, update, and delete operations appropriately. | Docs Link (opens in a new tab) |
Data Source Schemas | x-speakeasy-entity-operation: MyEntity#read | Hoists and merges JSON schemas associated with all read operations into a single data source. | Docs Link (opens in a new tab) |
Create Methods | x-speakeasy-entity-operation: MyEntity#create | Speakeasy generates platform connector logic to invoke all API requests and save responses to the Terraform state. | Docs Link (opens in a new tab) |
Read Methods | x-speakeasy-entity-operation: MyEntity#read | Speakeasy generates platform connector logic to invoke all API requests and save responses to the Terraform state. Also invoked in CREATE and UPDATE methods for additional data calls, enabling drift detection and import. | Docs Link (opens in a new tab) |
Update Methods | x-speakeasy-entity-operation: MyEntity#update | Speakeasy generates platform connector logic to invoke all API requests and save responses to the Terraform state. Plan modifiers force resource recreation when needed. | Docs Link (opens in a new tab) |
Delete Methods | x-speakeasy-entity-operation: MyEntity#delete | Speakeasy generates platform connector logic to invoke all API requests and save responses to the Terraform state. | Docs Link (opens in a new tab) |
Plan Validators | x-speakeasy-plan-validators | Generated when using restricted OpenAPI data types (e.g., JSON fields, date fields, etc.). Also generated for specific Speakeasy extensions. | Docs Link (opens in a new tab) |
Plan Modifiers | x-speakeasy-plan-modifiers | Ensures API and terraform state /terraform plan commands have appropriate semantics, such as diff-detection (opens in a new tab). | Docs Link (opens in a new tab) |
Resource Imports | n/a | Each resource will be inserted into the provider resource list. | Docs Link (opens in a new tab) |
Supported OpenAPI Semantics
Supported OpenAPI Semantics
OpenAPI Semantics | Speakeasy Support | Comments / Limitations |
---|---|---|
Resource Schemas (const) | ✅ Full support | When an attribute in an OpenAPI specification is specified as const , it is removed from a Terraform schema and always sent in the request or assumed in the response. |
Resource Schemas (default) | ✅ Full support | When an attribute specifies a default value, this value will be used whenever that attribute is not explicitly set, ensuring consistency and reliability. |
Server Configuration | ✅ Full support | A server_url variable is available in the provider to enable it to be invoked against any API server, defaulted to the first entry in the servers field of your OpenAPI specification. |
Global Authentication | ✅ Full support | Every authentication mechanism that relies on static authorization is supported with its values automatically available to be configured in the provider configuration. For OAuth, a custom hook containing your authentication flow logic needs to be written. |
Query Parameter Serialization | ✅ Full support | All query parameter attributes will be available as resource or data source attributes in a Terraform-native form. Might require remapping through x-speakeasy-match . |
Request Headers | ✅ Full support | All request attributes will be available as resource or data source attributes in a Terraform-native form. |
Multiple API Requests in One CRUD Step | ✅ Full support | For example, create requires two API calls. |
JSON Schema type: string | ✅ Full support | |
JSON Schema type: number | ✅ Full support | |
JSON Schema type: integer | ✅ Full support | |
JSON Schema type: boolean | ✅ Full support | |
JSON Schema type: object | ✅ Full support | |
JSON Schema type: null | ✅ Full support | |
JSON Schema required: [requiredPropertyA, ...] | ✅ Full support | Combined into Required or Optional Terraform attribute modifiers. |
JSON Schema enum: [...values...] | ✅ Full support | A plan validator is added to assert that only one of the predefined values is set. |
JSON Schema type: array | ✅ Full support | |
JSON Schema type: array, minItems: N | ✅ Full support | A plan validator is added to ensure the Terraform ListAttribute has N items set. |
JSON Schema type: array, maxItems: J | ✅ Full support | A plan validator is added to ensure the Terraform ListAttribute has J items set. |
JSON Schema type: array, uniqueItems: true | ✅ Full support | A plan validator is added to ensure the Terraform ListAttribute has all items as unique values. |
JSON Schema type: number, format: float | ✅ Full support | |
JSON Schema type: number, format: double | ✅ Full support | |
JSON Schema type: integer, format: int32 | ✅ Full support | |
JSON Schema type: integer, format: int64 | ✅ Full support | |
JSON Schema type: string, format: date | ✅ Full support | A plan validator is added to ensure that this string value is set to a date in the YYYY-MM-DD format. |
JSON Schema type: string, format: date-time | ✅ Full support | A plan validator is added to ensure that this string value is RFC 3339-compatible. |
JSON Schema format: binary | ✅ Full support | Accessible as a string attribute. |
JSON Schema nullable: true | ✅ Full support | Combined into Required or Optional Terraform attribute modifiers. |
JSON Schema additionalProperties: true | ✅ Full support | A free-form object without additionalProperties: true is treated as an empty object. |
JSON Schema additionalProperties: ${JSON Schema} | ✅ Full support | Full support for defining schemas for additional properties. |
JSON Schema oneOf: [${JSON Schema}, ...] | ✅ Full support | Represented as a nested object with one child attribute for each oneOf subschema. A plan validator is added that asserts only one child attribute can be set. |
JSON Schema anyOf: [${JSON Schema}, ...] | ✅ Full support | Considered the same as oneOf . |
JSON Schema allOf: [${JSON Schema}, ...] | ✅ Full support | Constructs an "uber-type" by merging the superset of all subschemas. |
JSON Schema "Any" Type | ✅ Full support | Requires the x-speakeasy-type-override: any annotation. Used as an escape hatch. |
OpenAPI readOnly: true | ✅ Full support | |
OpenAPI writeOnly: true | ✅ Full support | |
Example Generation | ✅ Full support | Propagates example and examples into generated Terraform resource examples. Uses a type-appropriate value for other cases. |
Operation-Specific Authentication | ⚠️ Partial support | Speakeasy doesn't support overriding global authentication on specific operations without advanced techniques like monkey patching. |
label / matrix Path Param Serialization | ⚠️ No support | Remapping may be required through x-speakeasy-match . |
XML Request Body Serialization | ⚠️ Partial support | Full support for JSON data types but no support for XML. |
XML Response Body Deserialization | ⚠️ Partial support | Full support for JSON data types but no support for XML response bodies. |
Circular References | ⚠️ Partial support | x-speakeasy-type-override: any enables setting attributes with jsonencode(...arbitrary data...) . |
Lists of Lists of Primitives | ⚠️ Partial support | x-speakeasy-type-override: any enables setting lists of lists, but Terraform's ListAttribute only supports primitive types. |
Terraform Framework Types From JSON Schema Types
JSON Schema Type | JSON Schema Additions | Terraform Framework Type | Notes |
---|---|---|---|
type: string | - | schema.StringAttribute | |
type: number | - | schema.NumberAttribute | |
type: integer | - | schema.Int64Attribute | |
type: boolean | - | schema.BoolAttribute | |
type: array | - | schema.ListAttribute or schema.ListNestedAttribute | A ListAttribute is used when the items has primitive type . |
type: array | format: set | schema.SetAttribute or schema.SetNestedAttribute | A SetAttribute is used when the items has primitive type . |
type: object | properties: {...} | schema.SingleNestedAttribute | |
type: object | additionalProperties: {...} | schema.MapAttribute or schema.MapNestedAttribute | A MapAttribute is used when the additionalProperties has primitive type . |
type: null | N/A | Element ignored |
JSON Schema Subschema Handling
JSON Schema Subschema Type | Handling | Full Docs |
---|---|---|
oneOf | A schema.SingleNestedAttribute is created with one key for each oneOf child. Plan validator ensures that only one subattribute is used. | Docs Link (opens in a new tab) |
anyOf | Considered the same as oneOf . Speakeasy does not strictly enforce this subschema type in production environments. | Docs Link (opens in a new tab) |
allOf | Merges all subschemas. When the subschemas are objects, it creates a composite object with properties from all child schemas. | Docs Link (opens in a new tab) |