@@ -70,11 +70,13 @@ func ResourceDeployment() *schema.Resource {
7070 "min_size" : {
7171 Type : schema .TypeInt ,
7272 Optional : true ,
73+ Computed : true ,
7374 Description : "The minimum size of the pool" ,
7475 },
7576 "max_size" : {
7677 Type : schema .TypeInt ,
7778 Optional : true ,
79+ Computed : true ,
7880 Description : "The maximum size of the pool" ,
7981 },
8082 "size" : {
@@ -190,14 +192,6 @@ func ResourceDeploymentCreate(ctx context.Context, d *schema.ResourceData, m int
190192
191193 req .Endpoints = []* inference.EndpointSpec {& endpoint }
192194
193- if maxSize , ok := d .GetOk ("max_size" ); ok {
194- req .MaxSize = scw .Uint32Ptr (uint32 (maxSize .(int )))
195- }
196-
197- if minSize , ok := d .GetOk ("min_size" ); ok {
198- req .MaxSize = scw .Uint32Ptr (uint32 (minSize .(int )))
199- }
200-
201195 if isAcceptingEula , ok := d .GetOk ("accept_eula" ); ok {
202196 req .AcceptEula = scw .BoolPtr (isAcceptingEula .(bool ))
203197 }
@@ -245,7 +239,7 @@ func ResourceDeploymentRead(ctx context.Context, d *schema.ResourceData, m inter
245239 _ = d .Set ("created_at" , types .FlattenTime (deployment .CreatedAt ))
246240 _ = d .Set ("updated_at" , types .FlattenTime (deployment .UpdatedAt ))
247241
248- if deployment .Endpoints [0 ].PrivateNetwork . PrivateNetworkID != "" {
242+ if deployment .Endpoints [0 ].PrivateNetwork != nil {
249243 _ = d .Set ("endpoint_private_url" , deployment .Endpoints [0 ].URL )
250244 _ = d .Set ("endpoint_private_id" , deployment .Endpoints [0 ].ID )
251245 _ = d .Set ("disable_auth_private" , deployment .Endpoints [0 ].DisableAuth )
@@ -255,7 +249,7 @@ func ResourceDeploymentRead(ctx context.Context, d *schema.ResourceData, m inter
255249 _ = d .Set ("disable_auth_public" , deployment .Endpoints [0 ].DisableAuth )
256250 }
257251 if len (deployment .Endpoints ) == 2 {
258- if deployment .Endpoints [1 ].PrivateNetwork . PrivateNetworkID != "" {
252+ if deployment .Endpoints [1 ].PrivateNetwork != nil {
259253 _ = d .Set ("endpoint_private_url" , deployment .Endpoints [1 ].URL )
260254 _ = d .Set ("endpoint_private_id" , deployment .Endpoints [1 ].ID )
261255 _ = d .Set ("disable_auth_private" , deployment .Endpoints [1 ].DisableAuth )
0 commit comments