CLI
Terraform configuration options
This section details the available configuration options for Terraform Provider generation. All configuration is managed in the gen.yaml file under the terraform section.
Version and general configuration
Section titled “Version and general configuration”terraform: version: 1.2.3 author: "examplecorp" packageName: "examplecloud"Name
version
Required
true
Description
Current version of the Terraform Provider.
Default Value
0.0.1
packageName
Required
true
Description
Terraform Provider name. Prefixes all resource names unless
providerTypeNameOverride is set. For providers published in the public Terraform Registry, this typically matches the suffix after terraform-provider- in the GitHub Repository name.Default Value
terraform
author
Required
true
Description
Terraform Provider namespace. For providers published in the public Terraform Registry, this typically matches the GitHub Organization name.
Default Value
speakeasy
providerTypeNameOverride
Required
false
Description
Overrides the provider type name used for resource naming. When set, this value is used as the prefix for all resource, data source, ephemeral resource, and action type names instead of
packageName. This is useful for variant providers that need to use the same resource names as another provider (e.g. a beta provider sharing resource names with the main provider).Default Value
Additions
Section titled “Additions”terraform: additionalDependencies: {} additionalResources: [] additionalDataSources: [] additionalEphemeralResources: []Name
additionalDependencies
Required
false
Description
Add additional dependencies to include in the generated
go.mod.Default Value
{}
additionalResources
Required
false
Description
A list of
{ importLocation?: string, importAlias?: string, resource: string } objects to insert into the provider resource list.Default Value
[]
additionalDataSources
Required
false
Description
A list of
{ importLocation?: string, importAlias?: string, datasource: string } objects to insert into the provider data source list.Default Value
[]
additionalEphemeralResources
Required
false
Description
A list of
{ importLocation?: string, importAlias?: string, resource: string } objects to insert into the provider ephemeral resource list.Default Value
[]
Forward compatibility
Section titled “Forward compatibility”terraform: forwardCompatibleEnumsByDefault: trueName
forwardCompatibleEnumsByDefault
Required
false
Description
When true, enums used in responses are generated as open enums that accept unknown values. This prevents new enum values added by the API from breaking the Terraform provider. Individual enums can be controlled with
x-speakeasy-unknown-values: allow or x-speakeasy-unknown-values: disallow in the OpenAPI spec.Default Value
false
Environment variables
Section titled “Environment variables”terraform: environmentVariables: - env: EXAMPLECLOUD_TOKEN providerAttribute: tokenName
environmentVariables
Required
false
Description
A list of objects with
[env: string, providerAttribute: string] keys/values to associate environment variables with a provider attribute.Default Value
[]