Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,088 changes: 903 additions & 185 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
speakeasyVersion: 1.523.0
speakeasyVersion: 1.675.4
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:ef289a7c77637337b07da6402aded23c09840a838deb6ace7ffcf8c47b97b311
sourceBlobDigest: sha256:0734b26610de4c72bceb115a185fd752842e6983c63985437cb1f43d5c320b53
sourceRevisionDigest: sha256:4a292d67de9f224a3edbcc95cf37771fbb76505b2d669bb36359a5077698d69b
sourceBlobDigest: sha256:3ddee752f9284f45c707aa3257aac03e7702ef8c6f22f8247e5b01c7b46ea24e
tags:
- latest
- speakeasy-sdk-regen-1742793032
- speakeasy-sdk-regen-1758759296
- 1.0.0
targets:
terraform:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:ef289a7c77637337b07da6402aded23c09840a838deb6ace7ffcf8c47b97b311
sourceBlobDigest: sha256:0734b26610de4c72bceb115a185fd752842e6983c63985437cb1f43d5c320b53
sourceRevisionDigest: sha256:4a292d67de9f224a3edbcc95cf37771fbb76505b2d669bb36359a5077698d69b
sourceBlobDigest: sha256:3ddee752f9284f45c707aa3257aac03e7702ef8c6f22f8247e5b01c7b46ea24e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.17.3"
version = "0.18.0"
}
}
}
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@ Based on:
### Generated
- [terraform v0.14.1] .
### Releases
- [Terraform v0.14.1] https://registry.terraform.io/providers/epilot-dev/epilot-product/0.14.1 - .
- [Terraform v0.14.1] https://registry.terraform.io/providers/epilot-dev/epilot-product/0.14.1 - .

## 2025-12-11 00:16:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.675.4 (2.779.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [terraform v0.18.0] .
### Releases
- [Terraform v0.18.0] https://registry.terraform.io/providers/epilot-dev/epilot-product/0.18.0 - .
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.17.3"
version = "0.18.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.17.3"
version = "0.18.0"
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
persistentEdits: {}
tests:
generateTests: true
generateNewTests: false
Expand All @@ -35,7 +40,7 @@ go:
outputModelSuffix: output
packageName: openapi
terraform:
version: 0.17.3
version: 0.18.0
additionalDataSources: []
additionalDependencies: {}
additionalEphemeralResources: []
Expand All @@ -45,9 +50,14 @@ terraform:
allowUnknownFieldsInWeakUnions: false
author: epilot-dev
baseErrorName: SDKBaseError
debugLogging: {}
defaultErrorName: SDKError
enableCustomCodeRegions: false
enableOperationSecurity: false
enableOperationServers: false
enableTypeDeduplication: true
environmentVariables: []
excludeEmptyObjectSchemas: false
imports:
option: openapi
paths:
Expand All @@ -56,6 +66,9 @@ terraform:
operations: operations
shared: shared
webhooks: webhooks
includeEmptyObjects: false
inferUnionDiscriminators: false
inputModelSuffix: input
outputModelSuffix: output
packageName: epilot-product
unionStrategy: populated-fields
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ module github.com/epilot-dev/terraform-provider-epilot-product
go 1.23.7

require (
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
github.com/ericlagergren/decimal v0.0.0-20240411145413-00de7ca16731
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/terraform-plugin-docs v0.22.0
github.com/hashicorp/terraform-plugin-framework v1.15.0
github.com/hashicorp/terraform-plugin-framework v1.15.1
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0
github.com/hashicorp/terraform-plugin-framework-validators v0.17.0
github.com/hashicorp/terraform-plugin-framework-validators v0.18.0
github.com/hashicorp/terraform-plugin-go v0.28.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/stretchr/testify v1.8.3
)

require (
Expand All @@ -25,6 +26,7 @@ require (
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.8.1 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand Down Expand Up @@ -52,6 +54,7 @@ require (
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw=
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ=
github.com/ericlagergren/decimal v0.0.0-20240411145413-00de7ca16731 h1:R/ZjJpjQKsZ6L/+Gf9WHbt31GG8NMVcpRqUE+1mMIyo=
github.com/ericlagergren/decimal v0.0.0-20240411145413-00de7ca16731/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
Expand Down Expand Up @@ -91,12 +91,12 @@ github.com/hashicorp/terraform-json v0.25.0 h1:rmNqc/CIfcWawGiwXmRuiXJKEiJu1ntGo
github.com/hashicorp/terraform-json v0.25.0/go.mod h1:sMKS8fiRDX4rVlR6EJUMudg1WcanxCMoWwTLkgZP/vc=
github.com/hashicorp/terraform-plugin-docs v0.22.0 h1:fwIDStbFel1PPNkM+mDPnpB4efHZBdGoMz/zt5FbTDw=
github.com/hashicorp/terraform-plugin-docs v0.22.0/go.mod h1:55DJVyZ7BNK4t/lANcQ1YpemRuS6KsvIO1BbGA+xzGE=
github.com/hashicorp/terraform-plugin-framework v1.15.0 h1:LQ2rsOfmDLxcn5EeIwdXFtr03FVsNktbbBci8cOKdb4=
github.com/hashicorp/terraform-plugin-framework v1.15.0/go.mod h1:hxrNI/GY32KPISpWqlCoTLM9JZsGH3CyYlir09bD/fI=
github.com/hashicorp/terraform-plugin-framework v1.15.1 h1:2mKDkwb8rlx/tvJTlIcpw0ykcmvdWv+4gY3SIgk8Pq8=
github.com/hashicorp/terraform-plugin-framework v1.15.1/go.mod h1:hxrNI/GY32KPISpWqlCoTLM9JZsGH3CyYlir09bD/fI=
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA=
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E=
github.com/hashicorp/terraform-plugin-framework-validators v0.17.0 h1:0uYQcqqgW3BMyyve07WJgpKorXST3zkpzvrOnf3mpbg=
github.com/hashicorp/terraform-plugin-framework-validators v0.17.0/go.mod h1:VwdfgE/5Zxm43flraNa0VjcvKQOGVrcO4X8peIri0T0=
github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 h1:OQnlOt98ua//rCw+QhBbSqfW3QbwtVrcdWeQN5gI3Hw=
github.com/hashicorp/terraform-plugin-framework-validators v0.18.0/go.mod h1:lZvZvagw5hsJwuY7mAY6KUz45/U6fiDR0CzQAwWD0CA=
github.com/hashicorp/terraform-plugin-go v0.28.0 h1:zJmu2UDwhVN0J+J20RE5huiF3XXlTYVIleaevHZgKPA=
github.com/hashicorp/terraform-plugin-go v0.28.0/go.mod h1:FDa2Bb3uumkTGSkTFpWSOwWJDwA7bf3vdP3ltLDTH6o=
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/coupon_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ type CouponDataSourceModel struct {
Org types.String `tfsdk:"org"`
PercentageValue types.String `tfsdk:"percentage_value"`
Prices *tfTypes.BaseRelation `tfsdk:"prices"`
PromoCodeUsage jsontypes.Normalized `tfsdk:"promo_code_usage"`
PromoCodes []tfTypes.PromoCode `tfsdk:"promo_codes"`
PromoCodeUsage jsontypes.Normalized `tfsdk:"promo_code_usage"`
Purpose []types.String `tfsdk:"purpose"`
RequiresPromoCode types.Bool `tfsdk:"requires_promo_code"`
Schema types.String `tfsdk:"schema"`
Expand Down
14 changes: 5 additions & 9 deletions internal/provider/coupon_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
speakeasy_stringplanmodifier "github.com/epilot-dev/terraform-provider-epilot-product/internal/planmodifiers/stringplanmodifier"
tfTypes "github.com/epilot-dev/terraform-provider-epilot-product/internal/provider/types"
"github.com/epilot-dev/terraform-provider-epilot-product/internal/sdk"
"github.com/epilot-dev/terraform-provider-epilot-product/internal/validators"
speakeasy_objectvalidators "github.com/epilot-dev/terraform-provider-epilot-product/internal/validators/objectvalidators"
speakeasy_stringvalidators "github.com/epilot-dev/terraform-provider-epilot-product/internal/validators/stringvalidators"
"github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes"
Expand Down Expand Up @@ -58,8 +57,8 @@ type CouponResourceModel struct {
Org types.String `tfsdk:"org"`
PercentageValue types.String `tfsdk:"percentage_value"`
Prices *tfTypes.BaseRelation `tfsdk:"prices"`
PromoCodeUsage jsontypes.Normalized `tfsdk:"promo_code_usage"`
PromoCodes []tfTypes.PromoCode `tfsdk:"promo_codes"`
PromoCodeUsage jsontypes.Normalized `tfsdk:"promo_code_usage"`
Purpose []types.String `tfsdk:"purpose"`
RequiresPromoCode types.Bool `tfsdk:"requires_promo_code"`
Schema types.String `tfsdk:"schema"`
Expand Down Expand Up @@ -121,9 +120,6 @@ func (r *CouponResource) Schema(ctx context.Context, req resource.SchemaRequest,
PlanModifiers: []planmodifier.String{
speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress),
},
Validators: []validator.String{
validators.IsRFC3339(),
},
},
"description": schema.StringAttribute{
Computed: true,
Expand Down Expand Up @@ -397,9 +393,6 @@ func (r *CouponResource) Schema(ctx context.Context, req resource.SchemaRequest,
PlanModifiers: []planmodifier.String{
speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress),
},
Validators: []validator.String{
validators.IsRFC3339(),
},
},
},
}
Expand Down Expand Up @@ -635,7 +628,10 @@ func (r *CouponResource) Delete(ctx context.Context, req resource.DeleteRequest,
resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res))
return
}
if res.StatusCode != 200 {
switch res.StatusCode {
case 200, 404:
break
default:
resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse))
return
}
Expand Down
Loading