@@ -20,7 +20,7 @@ import (
2020 "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
2121
2222 "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
23- "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer"
23+ loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api "
2424)
2525
2626// Ensure the implementation satisfies the expected interfaces.
@@ -151,7 +151,7 @@ func (r *loadBalancerDataSource) Schema(_ context.Context, _ datasource.SchemaRe
151151 Description : descriptions ["listeners.display_name" ],
152152 Computed : true ,
153153 },
154- "port" : schema.Int64Attribute {
154+ "port" : schema.Int32Attribute {
155155 Description : descriptions ["port" ],
156156 Computed : true ,
157157 },
@@ -160,8 +160,9 @@ func (r *loadBalancerDataSource) Schema(_ context.Context, _ datasource.SchemaRe
160160 Computed : true ,
161161 },
162162 "server_name_indicators" : schema.ListNestedAttribute {
163- Description : descriptions ["server_name_indicators" ],
164- Optional : true ,
163+ Description : descriptions ["server_name_indicators" ],
164+ DeprecationMessage : "`server_name_indicators` is deprecated and will be removed after October 2026" ,
165+ Optional : true ,
165166 NestedObject : schema.NestedAttributeObject {
166167 Attributes : map [string ]schema.Attribute {
167168 "name" : schema.StringAttribute {
@@ -326,7 +327,7 @@ func (r *loadBalancerDataSource) Schema(_ context.Context, _ datasource.SchemaRe
326327 Description : descriptions ["target_pools.name" ],
327328 Computed : true ,
328329 },
329- "target_port" : schema.Int64Attribute {
330+ "target_port" : schema.Int32Attribute {
330331 Description : descriptions ["target_port" ],
331332 Computed : true ,
332333 },
@@ -395,7 +396,7 @@ func (r *loadBalancerDataSource) Read(ctx context.Context, req datasource.ReadRe
395396 ctx = tflog .SetField (ctx , "name" , name )
396397 ctx = tflog .SetField (ctx , "region" , region )
397398
398- lbResp , err := r .client .GetLoadBalancer (ctx , projectId , region , name ).Execute ()
399+ lbResp , err := r .client .DefaultAPI . GetLoadBalancer (ctx , projectId , region , name ).Execute ()
399400 if err != nil {
400401 utils .LogError (
401402 ctx ,
0 commit comments