Skip to content

Commit 180aef8

Browse files
chore(deps): bump github.com/stackitcloud/stackit-sdk-go/services/rabbitmq from 0.25.6 to 0.26.0 (#1229)
* chore(deps): bump github.com/stackitcloud/stackit-sdk-go/services/rabbitmq Bumps [github.com/stackitcloud/stackit-sdk-go/services/rabbitmq](https://github.com/stackitcloud/stackit-sdk-go) from 0.25.6 to 0.26.0. - [Release notes](https://github.com/stackitcloud/stackit-sdk-go/releases) - [Changelog](https://github.com/stackitcloud/stackit-sdk-go/blob/main/CHANGELOG.md) - [Commits](stackitcloud/stackit-sdk-go@services/logme/v0.25.6...services/ske/v0.26.0) --- updated-dependencies: - dependency-name: github.com/stackitcloud/stackit-sdk-go/services/rabbitmq dependency-version: 0.26.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * breaking_change(rabbitmq): TlsProtocols is now an array of strings instead of a single string Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent 5047638 commit 180aef8

7 files changed

Lines changed: 24 additions & 15 deletions

File tree

docs/data-sources/rabbitmq_instance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ Read-Only:
5858
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
5959
- `syslog` (List of String) List of syslog servers to send logs to.
6060
- `tls_ciphers` (List of String) List of TLS ciphers to use.
61-
- `tls_protocols` (String) TLS protocol to use.
61+
- `tls_protocols` (List of String) TLS protocol versions to use.

docs/resources/rabbitmq_instance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ Optional:
7575
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
7676
- `syslog` (List of String) List of syslog servers to send logs to.
7777
- `tls_ciphers` (List of String) List of TLS ciphers to use.
78-
- `tls_protocols` (String) TLS protocol to use.
78+
- `tls_protocols` (List of String) TLS protocol versions to use.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ require (
2828
github.com/stackitcloud/stackit-sdk-go/services/observability v0.16.3
2929
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.24.6
3030
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.3.5
31-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.25.6
31+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0
3232
github.com/stackitcloud/stackit-sdk-go/services/redis v0.25.6
3333
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.18.5
3434
github.com/stackitcloud/stackit-sdk-go/services/scf v0.4.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.24.6 h1:oTVx1+O177
185185
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.24.6/go.mod h1:6ZBeCCY6qG8w1oK7osf61Egyv3mp7Ahv6GDGxiarDGo=
186186
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.3.5 h1:H67e3KnHQx954yI8fuQmxXwRf/myqAdLg2KvxImp00g=
187187
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.3.5/go.mod h1:xmAWk9eom8wznvLuLfm0F4xyeiBX8LaggXsKFmos+dw=
188-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.25.6 h1:+TFfl1ON/uM5aO0FdkBNYKBa7vx0zrCYVtX6zvqQYBA=
189-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.25.6/go.mod h1:hnhvlLX1Y71R8KIQqLBeoSZqkU5ZJOG0J4wz0LeUdaw=
188+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0 h1:/8lmviszgrB+0Cz7HdhFELyTiTeqIs7LfnI6sNX4rW8=
189+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0/go.mod h1:hnhvlLX1Y71R8KIQqLBeoSZqkU5ZJOG0J4wz0LeUdaw=
190190
github.com/stackitcloud/stackit-sdk-go/services/redis v0.25.6 h1:CXM9cZ9WeTyJd+Aw/hnJnDsKRVAQi4qgtd0RJ3zoPwo=
191191
github.com/stackitcloud/stackit-sdk-go/services/redis v0.25.6/go.mod h1:KJNceOHRefjku1oVBoHG7idCS/SeW42WJ+55bN3AxrQ=
192192
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.18.5 h1:MZ5aTO2NQ1Jecmi67ByGskve5nKXHl91fE+z+vFjxt4=

stackit/internal/services/rabbitmq/instance/datasource.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
8181
"roles": "List of roles to assign to the instance.",
8282
"syslog": "List of syslog servers to send logs to.",
8383
"tls_ciphers": "List of TLS ciphers to use.",
84-
"tls_protocols": "TLS protocol to use.",
84+
"tls_protocols": "TLS protocol versions to use.",
8585
}
8686

8787
resp.Schema = schema.Schema{
@@ -177,8 +177,9 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
177177
ElementType: types.StringType,
178178
Computed: true,
179179
},
180-
"tls_protocols": schema.StringAttribute{
180+
"tls_protocols": schema.ListAttribute{
181181
Description: parametersDescriptions["tls_protocols"],
182+
ElementType: types.StringType,
182183
Computed: true,
183184
},
184185
},

stackit/internal/services/rabbitmq/instance/resource.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type parametersModel struct {
6767
Roles types.List `tfsdk:"roles"`
6868
Syslog types.List `tfsdk:"syslog"`
6969
TlsCiphers types.List `tfsdk:"tls_ciphers"`
70-
TlsProtocols types.String `tfsdk:"tls_protocols"`
70+
TlsProtocols types.List `tfsdk:"tls_protocols"`
7171
}
7272

7373
// Types corresponding to parametersModel
@@ -84,7 +84,7 @@ var parametersTypes = map[string]attr.Type{
8484
"roles": basetypes.ListType{ElemType: types.StringType},
8585
"syslog": basetypes.ListType{ElemType: types.StringType},
8686
"tls_ciphers": basetypes.ListType{ElemType: types.StringType},
87-
"tls_protocols": basetypes.StringType{},
87+
"tls_protocols": basetypes.ListType{ElemType: types.StringType},
8888
}
8989

9090
// NewInstanceResource is a helper function to simplify the provider implementation.
@@ -144,7 +144,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
144144
"roles": "List of roles to assign to the instance.",
145145
"syslog": "List of syslog servers to send logs to.",
146146
"tls_ciphers": "List of TLS ciphers to use.",
147-
"tls_protocols": "TLS protocol to use.",
147+
"tls_protocols": "TLS protocol versions to use.",
148148
}
149149

150150
resp.Schema = schema.Schema{
@@ -274,8 +274,9 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
274274
Optional: true,
275275
Computed: true,
276276
},
277-
"tls_protocols": schema.StringAttribute{
277+
"tls_protocols": schema.ListAttribute{
278278
Description: parametersDescriptions["tls_protocols"],
279+
ElementType: types.StringType,
279280
Optional: true,
280281
Computed: true,
281282
},
@@ -749,7 +750,6 @@ func toInstanceParams(parameters *parametersModel) (*rabbitmq.InstanceParameters
749750
payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency)
750751
payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix)
751752
payloadParams.MonitoringInstanceId = conversion.StringValueToPointer(parameters.MonitoringInstanceId)
752-
payloadParams.TlsProtocols = rabbitmq.InstanceParametersGetTlsProtocolsAttributeType(conversion.StringValueToPointer(parameters.TlsProtocols))
753753

754754
var err error
755755
payloadParams.Plugins, err = conversion.StringListToPointer(parameters.Plugins)
@@ -772,6 +772,11 @@ func toInstanceParams(parameters *parametersModel) (*rabbitmq.InstanceParameters
772772
return nil, fmt.Errorf("converting tls_ciphers: %w", err)
773773
}
774774

775+
payloadParams.TlsProtocols, err = conversion.StringListToPointer(parameters.TlsProtocols)
776+
if err != nil {
777+
return nil, fmt.Errorf("converting tls_protocol_versions: %w", err)
778+
}
779+
775780
return payloadParams, nil
776781
}
777782

stackit/internal/services/rabbitmq/instance/resource_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
3737
types.StringValue("ciphers1"),
3838
types.StringValue("ciphers2"),
3939
}),
40-
"tls_protocols": types.StringValue(string(rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2)),
40+
"tls_protocols": types.ListValueMust(types.StringType, []attr.Value{
41+
types.StringValue("tlsv1.2"),
42+
types.StringValue("tlsv1.3"),
43+
}),
4144
})
4245

4346
var fixtureInstanceParameters = rabbitmq.InstanceParameters{
@@ -53,7 +56,7 @@ var fixtureInstanceParameters = rabbitmq.InstanceParameters{
5356
Roles: &[]string{"role1", "role2"},
5457
Syslog: &[]string{"syslog", "syslog2"},
5558
TlsCiphers: &[]string{"ciphers1", "ciphers2"},
56-
TlsProtocols: rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2.Ptr(),
59+
TlsProtocols: &[]string{"tlsv1.2", "tlsv1.3"},
5760
}
5861

5962
func TestMapFields(t *testing.T) {
@@ -105,7 +108,7 @@ func TestMapFields(t *testing.T) {
105108
"roles": []string{"role1", "role2"},
106109
"syslog": []string{"syslog", "syslog2"},
107110
"tls-ciphers": []string{"ciphers1", "ciphers2"},
108-
"tls-protocols": string(rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2),
111+
"tls-protocols": []string{"tlsv1.2", "tlsv1.3"},
109112
},
110113
},
111114
Model{

0 commit comments

Comments
 (0)