Skip to content

Commit

Permalink
Regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
blomqma committed Sep 13, 2024
1 parent ef7e80c commit 6baf23c
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 42 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 5a857039-7f4b-42d5-86fd-449767242ed2
management:
docChecksum: e4360dfb76bc6a89e63423a01fb462d3
docVersion: 1.0.0
speakeasyVersion: 1.393.2
generationVersion: 2.413.0
releaseVersion: 0.10.4
configChecksum: 1ffadd962a5fbaa8054b4641b477e9f0
speakeasyVersion: 1.396.7
generationVersion: 2.415.6
releaseVersion: 0.10.5
configChecksum: d1007f22f98a4ca33da84ce78fb0fdb5
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-product.git
repoSubDirectory: .
published: true
Expand All @@ -22,7 +22,7 @@ features:
terraform:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
core: 3.24.9
core: 3.24.11
envVarSecurityUsage: 0.1.0
globalSecurity: 2.81.8
globalServerURLs: 2.82.1
Expand Down
61 changes: 49 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ TF_REATTACH_PROVIDERS=... terraform apply
<!-- Start Table of Contents [toc] -->
## Table of Contents

* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Installation](#installation)
* [Available Resources and Data Sources](#available-resources-and-data-sources)
* [Testing the provider locally](#testing-the-provider-locally)
<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation
<!-- Start Installation [installation] -->
## Installation

To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`.

Expand All @@ -77,7 +78,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.10.4"
version = "0.10.5"
}
}
}
Expand All @@ -86,21 +87,19 @@ provider "epilot-product" {
# Configuration options
}
```
<!-- End SDK Installation [installation] -->
<!-- End Installation [installation] -->



<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
<!-- Start Testing the provider locally [usage] -->
## Testing the provider locally

### Testing the provider locally
#### Local Provider

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
Expand All @@ -109,9 +108,47 @@ cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```
<!-- End SDK Example Usage [usage] -->

#### Compiled Provider

Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.

1. Execute `go build` to construct a binary called `terraform-provider-epilot-product`
2. Ensure that the `.terraformrc` file is configured with a `dev_overrides` section such that your local copy of terraform can see the provider binary

Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set.

```
provider_installation {
dev_overrides {
"registry.terraform.io/epilot-dev/epilot-product" = "<PATH>"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
```
<!-- End Testing the provider locally [usage] -->



<!-- Start Available Resources and Data Sources [operations] -->
## Available Resources and Data Sources

### Resources

* [epilot-product_price](docs/resources/price.md)
* [epilot-product_product](docs/resources/product.md)
* [epilot-product_tax](docs/resources/tax.md)
### Data Sources

* [epilot-product_price](docs/data-sources/price.md)
* [epilot-product_product](docs/data-sources/product.md)
* [epilot-product_tax](docs/data-sources/tax.md)
<!-- End Available Resources and Data Sources [operations] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.10.4"
version = "0.10.5"
}
}
}
Expand Down
24 changes: 3 additions & 21 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
# Provider definitions
terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.10.1"
version = "0.10.5"
}
}
}

# Variables
variable "epilot_auth" {
type = string
}

variable "product_api_url" {
type = string
default = "https://product.dev.sls.epilot.io"
}
# Providers configuration

provider "epilot-product" {
epilot_auth = var.epilot_auth
server_url = var.product_api_url
}


# resource "epilot-product_product" "my_product" {

# }
# Configuration options
}
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ go:
outputModelSuffix: output
packageName: openapi
terraform:
version: 0.10.4
version: 0.10.5
additionalDataSources: []
additionalDependencies: {}
additionalResources: []
Expand Down
7 changes: 5 additions & 2 deletions internal/sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func Float32(f float32) *float32 { return &f }
// Float64 provides a helper function to return a pointer to a float64
func Float64(f float64) *float64 { return &f }

// Pointer provides a helper function to return a pointer to a type
func Pointer[T any](v T) *T { return &v }

type sdkConfiguration struct {
Client HTTPClient
Security func(context.Context) (interface{}, error)
Expand Down Expand Up @@ -150,8 +153,8 @@ func New(opts ...SDKOption) *SDK {
Language: "go",
OpenAPIDocVersion: "1.0.0",
SDKVersion: "0.0.1",
GenVersion: "2.413.0",
UserAgent: "speakeasy-sdk/go 0.0.1 2.413.0 1.0.0 github.com/epilot-dev/terraform-provider-epilot-product/internal/sdk",
GenVersion: "2.415.6",
UserAgent: "speakeasy-sdk/go 0.0.1 2.415.6 1.0.0 github.com/epilot-dev/terraform-provider-epilot-product/internal/sdk",
Hooks: hooks.New(),
},
}
Expand Down
1 change: 1 addition & 0 deletions internal/sdk/types/pointers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ func Int(i int) *int { return &i }
func Int64(i int64) *int64 { return &i }
func Float32(f float32) *float32 { return &f }
func Float64(f float64) *float64 { return &f }
func Pointer[T any](v T) *T { return &v }

0 comments on commit 6baf23c

Please sign in to comment.