Skip to content
Closed
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
331 changes: 326 additions & 5 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
speakeasyVersion: 1.555.3
speakeasyVersion: 1.570.1
sources: {}
targets:
terraform:
source: kong-mesh
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.555.3
speakeasyVersion: 1.570.1
sources:
kong-mesh:
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: 1.555.3
speakeasyVersion: 1.570.1
sources:
kong-mesh:
inputs:
Expand Down
5 changes: 5 additions & 0 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
baseServerURL: ""
go:
version: 1.24.1
Expand All @@ -35,6 +39,7 @@ terraform:
additionalResources: []
allowUnknownFieldsInWeakUnions: false
author: kong
baseErrorName: KongMeshError
defaultErrorName: SDKError
enableTypeDeduplication: true
environmentVariables:
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
github.com/ebitengine/purego v0.8.2 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down Expand Up @@ -119,11 +119,11 @@ require (
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
go.opentelemetry.io/otel/metric v1.36.0 // indirect
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
go.opentelemetry.io/otel/trace v1.36.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH
github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60=
github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
Expand Down Expand Up @@ -310,20 +310,20 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
102 changes: 96 additions & 6 deletions internal/provider/mesh_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,108 @@ func (r *MeshDataSource) Schema(ctx context.Context, req datasource.SchemaReques
"cert": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"type": schema.StringAttribute{
Computed: true,
Description: `Parsed as JSON.`,
"file": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"file": schema.StringAttribute{
Computed: true,
MarkdownDescription: `Data source is a path to a file.` + "\n" +
`Deprecated, use other sources of a data.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"inline": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"inline": schema.StringAttribute{
Computed: true,
Description: `Data source is inline bytes.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"inline_string": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"inline_string": schema.StringAttribute{
Computed: true,
Description: `Data source is inline string`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"secret": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"secret": schema.StringAttribute{
Computed: true,
Description: `Data source is a secret with given Secret key.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
},
},
"key": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"type": schema.StringAttribute{
Computed: true,
Description: `Parsed as JSON.`,
"file": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"file": schema.StringAttribute{
Computed: true,
MarkdownDescription: `Data source is a path to a file.` + "\n" +
`Deprecated, use other sources of a data.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"inline": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"inline": schema.StringAttribute{
Computed: true,
Description: `Data source is inline bytes.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"inline_string": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"inline_string": schema.StringAttribute{
Computed: true,
Description: `Data source is inline string`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
"secret": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{
"secret": schema.StringAttribute{
Computed: true,
Description: `Data source is a secret with given Secret key.`,
},
"type": schema.StringAttribute{
Computed: true,
},
},
},
},
},
Expand Down
56 changes: 44 additions & 12 deletions internal/provider/mesh_data_source_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,51 @@ func (r *MeshDataSourceModel) RefreshFromSharedMeshItem(ctx context.Context, res
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig = &tfTypes.ProvidedCertificateAuthorityConfig{}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert == nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert = nil
} else {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert = &tfTypes.AccessKey{}
typeVarResult4, _ := json.Marshal(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.Type)
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Type = types.StringValue(string(typeVarResult4))
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert = &tfTypes.Cert{}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceFile != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.File = &tfTypes.DataSourceFile{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.File.File = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceFile.File)
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.File.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceFile.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInline != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Inline = &tfTypes.DataSourceInline{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Inline.Inline = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInline.Inline)
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Inline.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInline.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInlineString != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.InlineString = &tfTypes.DataSourceInlineString{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.InlineString.InlineString = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInlineString.InlineString)
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.InlineString.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceInlineString.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceSecret != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Secret = &tfTypes.DataSourceSecret{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Secret.Secret = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceSecret.Secret)
backends2.Conf.ProvidedCertificateAuthorityConfig.Cert.Secret.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Cert.DataSourceSecret.Type)
}
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key == nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key = nil
} else {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key = &tfTypes.AccessKey{}
typeVarResult5, _ := json.Marshal(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.Type)
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Type = types.StringValue(string(typeVarResult5))
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key = &tfTypes.Cert{}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceFile != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.File = &tfTypes.DataSourceFile{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.File.File = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceFile.File)
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.File.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceFile.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInline != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Inline = &tfTypes.DataSourceInline{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Inline.Inline = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInline.Inline)
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Inline.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInline.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInlineString != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.InlineString = &tfTypes.DataSourceInlineString{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.InlineString.InlineString = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInlineString.InlineString)
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.InlineString.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceInlineString.Type)
}
if backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceSecret != nil {
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Secret = &tfTypes.DataSourceSecret{}
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Secret.Secret = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceSecret.Secret)
backends2.Conf.ProvidedCertificateAuthorityConfig.Key.Secret.Type = types.StringPointerValue(backendsItem2.Conf.ProvidedCertificateAuthorityConfig.Key.DataSourceSecret.Type)
}
}
}
if backendsItem2.Conf.VaultCertificateAuthorityConfig != nil {
Expand Down
Loading
Loading