From 0538f5b367f6da49e8fd2059bb17f2b6bab85b61 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 5 Jan 2024 19:51:29 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.133.1 --- .speakeasy/gen.lock | 10 +-- README.md | 2 +- RELEASES.md | 10 ++- docs/index.md | 4 +- examples/provider/provider.tf | 2 +- gen.yaml | 2 +- .../boolplanmodifier/suppress_diff.go | 20 ++++- .../float64planmodifier/suppress_diff.go | 20 ++++- .../int64planmodifier/suppress_diff.go | 20 ++++- .../listplanmodifier/suppress_diff.go | 20 ++++- .../mapplanmodifier/suppress_diff.go | 20 ++++- .../numberplanmodifier/suppress_diff.go | 20 ++++- .../objectplanmodifier/suppress_diff.go | 20 ++++- .../setplanmodifier/suppress_diff.go | 20 ++++- .../stringplanmodifier/suppress_diff.go | 20 ++++- internal/planmodifiers/utils/state_check.go | 88 +++++++++++++++++++ internal/provider/provider.go | 5 +- internal/provider/utils.go | 10 ++- internal/sdk/sdk.go | 9 +- main.go | 2 +- 20 files changed, 272 insertions(+), 52 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 69c4b52..22f8459 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: e742591b-391d-4f4e-8484-d01a093b32ec management: - docChecksum: 550154cf1b4d0c237436fb18c418b5db + docChecksum: 34d22936f2456c2c461abdfc773e3fc4 docVersion: 0.0.3 speakeasyVersion: internal - generationVersion: 2.225.2 - releaseVersion: 0.1.0 - configChecksum: d92408a91beb4360d3ade54235c386a6 + generationVersion: 2.228.1 + releaseVersion: 0.2.0 + configChecksum: aa46c3314b27098c848b44960a4abd53 repoURL: https://github.com/LukeHagar/plexterraform.git repoSubDirectory: . published: true features: terraform: constsAndDefaults: 0.1.2 - core: 3.7.0 + core: 3.8.0 globalSecurity: 2.81.2 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 diff --git a/README.md b/README.md index f5b29bb..e7c52bc 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.1.0" + version = "0.2.0" } } } diff --git a/RELEASES.md b/RELEASES.md index 1038b2e..9fdc847 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -14,4 +14,12 @@ Based on: - OpenAPI Doc 0.0.3 - Speakeasy CLI 1.130.1 (2.225.2) https://github.com/speakeasy-api/speakeasy ### Generated -- [terraform v0.1.0] . \ No newline at end of file +- [terraform v0.1.0] . + +## 2024-01-05 19:50:57 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.133.1 (2.228.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [terraform v0.2.0] . \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 2c0a76c..ff53fa0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.1.0" + version = "0.2.0" } } } @@ -33,4 +33,4 @@ provider "PlexAPI" { ### Optional - `access_token` (String, Sensitive) -- `server_url` (String) Server URL (defaults to http://10.10.10.47:32400) +- `server_url` (String) Server URL (defaults to {protocol}://{ip}:{port}) diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index c196368..ee90fc9 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.1.0" + version = "0.2.0" } } } diff --git a/gen.yaml b/gen.yaml index cd87f71..8f7d0d7 100644 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: fixes: nameResolutionDec2023: false terraform: - version: 0.1.0 + version: 0.2.0 author: LukeHagar imports: option: openapi diff --git a/internal/planmodifiers/boolplanmodifier/suppress_diff.go b/internal/planmodifiers/boolplanmodifier/suppress_diff.go index 78e4482..f6929f0 100644 --- a/internal/planmodifiers/boolplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/boolplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Bool { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Bool { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyBool(ctx context.Context, req planmodifier.BoolR if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/float64planmodifier/suppress_diff.go b/internal/planmodifiers/float64planmodifier/suppress_diff.go index 7219cfe..d5c1d60 100644 --- a/internal/planmodifiers/float64planmodifier/suppress_diff.go +++ b/internal/planmodifiers/float64planmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Float64 { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Float64 { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyFloat64(ctx context.Context, req planmodifier.Fl if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/int64planmodifier/suppress_diff.go b/internal/planmodifiers/int64planmodifier/suppress_diff.go index cb5f786..f3c09ad 100644 --- a/internal/planmodifiers/int64planmodifier/suppress_diff.go +++ b/internal/planmodifiers/int64planmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Int64 { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Int64 { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyInt64(ctx context.Context, req planmodifier.Int6 if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/listplanmodifier/suppress_diff.go b/internal/planmodifiers/listplanmodifier/suppress_diff.go index eab51d5..f6a93d2 100644 --- a/internal/planmodifiers/listplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/listplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.List { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.List { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyList(ctx context.Context, req planmodifier.ListR if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/mapplanmodifier/suppress_diff.go b/internal/planmodifiers/mapplanmodifier/suppress_diff.go index e73f146..669ab05 100644 --- a/internal/planmodifiers/mapplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/mapplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Map { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Map { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyMap(ctx context.Context, req planmodifier.MapReq if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/numberplanmodifier/suppress_diff.go b/internal/planmodifiers/numberplanmodifier/suppress_diff.go index d13e559..efd6cbb 100644 --- a/internal/planmodifiers/numberplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/numberplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Number { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Number { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyNumber(ctx context.Context, req planmodifier.Num if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/objectplanmodifier/suppress_diff.go b/internal/planmodifiers/objectplanmodifier/suppress_diff.go index 3b388de..51c4a34 100644 --- a/internal/planmodifiers/objectplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/objectplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Object { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Object { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyObject(ctx context.Context, req planmodifier.Obj if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/setplanmodifier/suppress_diff.go b/internal/planmodifiers/setplanmodifier/suppress_diff.go index 00dbedc..8591d33 100644 --- a/internal/planmodifiers/setplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/setplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.Set { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.Set { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifySet(ctx context.Context, req planmodifier.SetReq if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/stringplanmodifier/suppress_diff.go b/internal/planmodifiers/stringplanmodifier/suppress_diff.go index 71ec8b7..6835ad0 100644 --- a/internal/planmodifiers/stringplanmodifier/suppress_diff.go +++ b/internal/planmodifiers/stringplanmodifier/suppress_diff.go @@ -9,13 +9,24 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" ) +const ( + // Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions] + Standard = iota + // ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation + ExplicitSuppress = iota +) + // SuppressDiff returns a plan modifier that propagates a state value into the planned value, when it is Known, and the Plan Value is Unknown -func SuppressDiff() planmodifier.String { - return suppressDiff{} +func SuppressDiff(strategy int) planmodifier.String { + return suppressDiff{ + strategy: strategy, + } } // suppressDiff implements the plan modifier. -type suppressDiff struct{} +type suppressDiff struct { + strategy int +} // Description returns a human-readable description of the plan modifier. func (m suppressDiff) Description(_ context.Context) string { @@ -42,6 +53,9 @@ func (m suppressDiff) PlanModifyString(ctx context.Context, req planmodifier.Str if utils.IsAllStateUnknown(ctx, req.State) { return } + if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) { + return + } resp.PlanValue = req.StateValue } diff --git a/internal/planmodifiers/utils/state_check.go b/internal/planmodifiers/utils/state_check.go index 66d9150..9b087eb 100644 --- a/internal/planmodifiers/utils/state_check.go +++ b/internal/planmodifiers/utils/state_check.go @@ -23,3 +23,91 @@ func IsAllStateUnknown(ctx context.Context, state tfsdk.State) bool { return !anyFound } + +func IsAnyKnownChange(ctx context.Context, plan tfsdk.Plan, state tfsdk.State) bool { + attrs := state.Schema.GetAttributes() + anyFound := false + for k, _ := range attrs { + stateValue := new(attr.Value) + planValue := new(attr.Value) + state.GetAttribute(ctx, path.Root(k), stateValue) + plan.GetAttribute(ctx, path.Root(k), planValue) + anyFound = !isKnownEqual(ctx, stateValue, planValue) + if anyFound { + break + } + } + + return anyFound +} + +type HasElements interface { + Elements() []attr.Value + IsUnknown() bool + IsNull() bool +} +type HasAttributes interface { + Attributes() map[string]attr.Value + IsUnknown() bool + IsNull() bool +} + +func isKnownEqual(ctx context.Context, a *attr.Value, b *attr.Value) bool { + if (*a).IsUnknown() || (*b).IsUnknown() { + return true + } + aType := (*a).Type(ctx) + bType := (*b).Type(ctx) + if !aType.Equal(bType) { + return false + } + attributeTypes, ok := aType.(attr.TypeWithAttributeTypes) + if ok { + check := true + for k, _ := range attributeTypes.AttributeTypes() { + objValA, isObjA := (*a).(HasAttributes) + objValB, isObjB := (*b).(HasAttributes) + if isObjA && isObjB { + if objValA.IsUnknown() || objValB.IsUnknown() { + continue + } + attrA, foundA := objValA.Attributes()[k] + attrB, foundB := objValB.Attributes()[k] + if foundA != foundB { + return false + } + if foundA { + check = isKnownEqual(ctx, &attrA, &attrB) + } + } + if !check { + break + } + } + return check + } + _, ok = aType.(attr.TypeWithElementType) + if ok { + aVal, aValList := (*a).(HasElements) + bVal, bValList := (*b).(HasElements) + if aValList && bValList { + if ((aVal).IsUnknown() || (aVal).IsNull()) && ((bVal).IsUnknown() || (bVal).IsNull()) { + return true + } + if len(aVal.Elements()) != len(bVal.Elements()) { + return false + } else { + for i, _ := range aVal.Elements() { + if !isKnownEqual(ctx, &aVal.Elements()[i], &bVal.Elements()[i]) { + return false + } + } + } + return true + } + return false + } + + isEqual := (*a).Equal(*b) + return isEqual +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 831e52a..6dd999e 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -6,7 +6,6 @@ import ( "context" "github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk" "github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/models/shared" - "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/provider/schema" @@ -39,7 +38,7 @@ func (p *PlexAPIProvider) Schema(ctx context.Context, req provider.SchemaRequest Description: `An Open API Spec for interacting with Plex.tv and Plex Servers`, Attributes: map[string]schema.Attribute{ "server_url": schema.StringAttribute{ - MarkdownDescription: "Server URL (defaults to http://10.10.10.47:32400)", + MarkdownDescription: "Server URL (defaults to {protocol}://{ip}:{port})", Optional: true, Required: false, }, @@ -63,7 +62,7 @@ func (p *PlexAPIProvider) Configure(ctx context.Context, req provider.ConfigureR ServerURL := data.ServerURL.ValueString() if ServerURL == "" { - ServerURL = "http://10.10.10.47:32400" + ServerURL = "{protocol}://{ip}:{port}" } accessToken := data.AccessToken.ValueString() diff --git a/internal/provider/utils.go b/internal/provider/utils.go index eabd0e3..3cbc17b 100644 --- a/internal/provider/utils.go +++ b/internal/provider/utils.go @@ -69,15 +69,17 @@ func merge(ctx context.Context, req resource.UpdateRequest, resp *resource.Updat return } - // we need a tftypes.Value for this Object to be able to use it with - // our reflection code + refreshPlan(ctx, plan, target, resp.Diagnostics) +} + +func refreshPlan(ctx context.Context, plan types.Object, target interface{}, diagnostics diag.Diagnostics) { obj := types.ObjectType{AttrTypes: plan.AttributeTypes(ctx)} val, err := plan.ToTerraformValue(ctx) if err != nil { - resp.Diagnostics.Append(diag.NewErrorDiagnostic("Object Conversion Error", "An unexpected error was encountered trying to convert object. This is always an error in the provider. Please report the following to the provider developer:\n\n"+err.Error())) + diagnostics.Append(diag.NewErrorDiagnostic("Object Conversion Error", "An unexpected error was encountered trying to convert object. This is always an error in the provider. Please report the following to the provider developer:\n\n"+err.Error())) return } - resp.Diagnostics.Append(tfReflect.Into(ctx, obj, val, target, tfReflect.Options{ + diagnostics.Append(tfReflect.Into(ctx, obj, val, target, tfReflect.Options{ UnhandledNullAsEmpty: true, UnhandledUnknownAsEmpty: true, }, path.Empty())...) diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go index 942bf70..c0a8a20 100644 --- a/internal/sdk/sdk.go +++ b/internal/sdk/sdk.go @@ -14,8 +14,6 @@ import ( // ServerList contains the list of servers available to the SDK var ServerList = []string{ - // The full address of your Plex Server - "http://10.10.10.47:32400", // The full address of your Plex Server "{protocol}://{ip}:{port}", } @@ -261,11 +259,10 @@ func New(opts ...SDKOption) *PlexAPI { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.3", - SDKVersion: "0.1.0", - GenVersion: "2.225.2", - UserAgent: "speakeasy-sdk/go 0.1.0 2.225.2 0.0.3 PlexAPI", + SDKVersion: "0.2.0", + GenVersion: "2.228.1", + UserAgent: "speakeasy-sdk/go 0.2.0 2.228.1 0.0.3 PlexAPI", ServerDefaults: []map[string]string{ - {}, { "protocol": "http", "ip": "10.10.10.47", diff --git a/main.go b/main.go index 5a62de3..8537f4e 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( // Run the docs generation tool, check its repository for more information on how it works and how docs // can be customized. -//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --rendered-provider-name terraform-provider-plex-api var ( // these will be set by the goreleaser configuration