Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/terraform-provider-hashicups
(Template, Clone this to get started) Terraform provider for Hashicups.
https://github.com/speakeasy-sdks/terraform-provider-hashicups
codegen openapi provider sdk terraform
Last synced: 2 months ago
JSON representation
(Template, Clone this to get started) Terraform provider for Hashicups.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/terraform-provider-hashicups
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-03-30T17:11:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T20:56:50.000Z (9 months ago)
- Last Synced: 2024-04-28T05:14:52.835Z (9 months ago)
- Topics: codegen, openapi, provider, sdk, terraform
- Language: Go
- Homepage: https://speakeasyapi.dev/docs/using-speakeasy/create-terraform/intro/
- Size: 247 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Provider Hashicups
This repository is an example of generating an example provider called [hashicups](https://github.com/hashicorp/terraform-provider-hashicups-pf) from the OpenAPI specification in `hashicups.yaml`, with configuration in `gen.yaml`. No other inputs are required.
It works by using the [Speakeasy](https://speakeasyapi.dev) platform and associated CLI Tooling to generate code. This tooling parses an OpenAPI specification annotated with extensions that help inform it about terraform resources, and how to invoke API operations to create, update, read and destroy those resources. For information on terraform annotations that you can add to your OpenAPI spec please see [here](https://speakeasyapi.dev/docs/using-speakeasy/create-terraform/intro/).
This provider is for demonstration purposes only. Do not publish this to the terraform registry.
## SDK Installation
To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`.
```hcl
terraform {
required_providers {
hashicups = {
source = "speakeasy/hashicups"
version = "0.14.1"
}
}
}provider "hashicups" {
# Configuration options
}
```## SDK Example Usage
### Testing the provider locally
Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.
This also allows for debuggers (e.g. delve) to be attached to the provider.
### Example
```sh
go run main.go --debug
# Copy the TF_REATTACH_PROVIDERS env var
# In a new terminal
cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```## Available Resources and Operations
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)