generate-terraform-provider

Generate Terraform providers from OpenAPI specifications using the Speakeasy CLI.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/berea-ch/bereach-sdk-ts --skill generate-terraform-provider-berea-ch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-terraform-provider
Source: https://github.com/berea-ch/bereach-sdk-ts/tree/main/.agents/skills/generate-terraform-provider
Command: npx skills add https://github.com/berea-ch/bereach-sdk-ts --skill generate-terraform-provider-berea-ch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of Terraform providers directly from OpenAPI specifications, streamlining infrastructure as code development for APIs.

Core Features & Use Cases

  • OpenAPI to Terraform: Converts API definitions into functional Terraform providers.
  • Entity & Operation Mapping: Annotates schemas and operations for resource generation.
  • Use Case: You have an OpenAPI spec for a new cloud service and need to manage its resources with Terraform. This Skill will generate the provider, allowing you to define and provision the service's resources in your Terraform configurations.

Quick Start

Use the generate-terraform-provider skill to create a Terraform provider from the OpenAPI spec located at './openapi.yaml', naming the provider 'MyService' and the package 'myservice'.

Frequently Asked Questions about generate-terraform-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Terraform provider from an OpenAPI specification?

You can generate a Terraform provider from an OpenAPI specification by using the Speakeasy CLI to automate code creation. The process involves annotating your schemas with `x-speakeasy-entity` and operations with `x-speakeasy-entity-operation` for CRUD mapping.

Can I map CRUD operations to API resources when converting OpenAPI to Terraform?

Yes, you can map CRUD operations when converting OpenAPI to Terraform by annotating your API operations with `x-speakeasy-entity-operation`. This mapping allows the generator to create functional resource definitions for your Terraform provider.

How do I publish a generated Terraform provider to the Terraform Registry?

To publish a generated Terraform provider to the Terraform Registry, you use the workflow configuration and publishing capabilities provided by the Speakeasy CLI. This allows you to distribute your provider for infrastructure as code provisioning.

Do I need to manually define resource schemas when generating Terraform providers from OpenAPI?

No, you do not need to manually define resource schemas when generating Terraform providers from OpenAPI. The generation process supports type inference and uses `x-speakeasy-entity` annotations to automatically map your existing API definitions.

What is the best way to manage a new cloud service with Terraform if I only have an OpenAPI spec?

The best way to manage a new cloud service with Terraform from an OpenAPI spec is to generate a custom provider using the Speakeasy CLI. This automates infrastructure as code development by converting your API definitions directly into manageable Terraform resources.

Does generating a Terraform provider from OpenAPI require any specific dependencies?

Generating a Terraform provider from OpenAPI requires the Speakeasy CLI to execute the code generation and workflow configuration. The primary input dependency is a valid OpenAPI specification file containing your API definitions and schemas.