@@ -281,34 +281,34 @@ func deleteCloudAccessPolicy(ctx context.Context, d *schema.ResourceData, client
281
281
return apiError (err )
282
282
}
283
283
284
- func validateCloudAccessPolicyScope (v interface {} , path cty.Path ) diag.Diagnostics {
284
+ func validateCloudAccessPolicyScope (v any , path cty.Path ) diag.Diagnostics {
285
285
if strings .Count (v .(string ), ":" ) != 1 {
286
286
return diag .Errorf ("invalid scope: %s. Should be in the `service:permission` format" , v .(string ))
287
287
}
288
288
289
289
return nil
290
290
}
291
291
292
- func validateCloudAccessPolicyAllowedSubnets (v interface {} , path cty.Path ) diag.Diagnostics {
292
+ func validateCloudAccessPolicyAllowedSubnets (v any , path cty.Path ) diag.Diagnostics {
293
293
_ , _ , err := net .ParseCIDR (v .(string ))
294
294
if err == nil {
295
295
return nil
296
296
}
297
297
return diag .Errorf ("Invalid IP CIDR : %s." , v .(string ))
298
298
}
299
299
300
- func flattenCloudAccessPolicyRealm (realm []gcom.AuthAccessPolicyRealmsInner ) []interface {} {
301
- var result []interface {}
300
+ func flattenCloudAccessPolicyRealm (realm []gcom.AuthAccessPolicyRealmsInner ) []any {
301
+ var result []any
302
302
303
303
for _ , r := range realm {
304
- labelPolicy := []interface {} {}
304
+ labelPolicy := []any {}
305
305
for _ , lp := range r .LabelPolicies {
306
- labelPolicy = append (labelPolicy , map [string ]interface {} {
306
+ labelPolicy = append (labelPolicy , map [string ]any {
307
307
"selector" : lp .Selector ,
308
308
})
309
309
}
310
310
311
- result = append (result , map [string ]interface {} {
311
+ result = append (result , map [string ]any {
312
312
"type" : r .Type ,
313
313
"identifier" : r .Identifier ,
314
314
"label_policy" : labelPolicy ,
@@ -318,29 +318,29 @@ func flattenCloudAccessPolicyRealm(realm []gcom.AuthAccessPolicyRealmsInner) []i
318
318
return result
319
319
}
320
320
321
- func flattenCloudAccessPolicyConditions (condition * gcom.AuthAccessPolicyConditions ) []interface {} {
321
+ func flattenCloudAccessPolicyConditions (condition * gcom.AuthAccessPolicyConditions ) []any {
322
322
if condition == nil || len (condition .GetAllowedSubnets ()) == 0 {
323
323
return nil
324
324
}
325
- var result []interface {}
325
+ var result []any
326
326
var allowedSubnets []string
327
327
328
328
for _ , sn := range condition .GetAllowedSubnets () {
329
329
allowedSubnets = append (allowedSubnets , * sn .String )
330
330
}
331
331
332
- result = append (result , map [string ]interface {} {
332
+ result = append (result , map [string ]any {
333
333
"allowed_subnets" : allowedSubnets ,
334
334
})
335
335
336
336
return result
337
337
}
338
338
339
- func expandCloudAccessPolicyConditions (condition []interface {} ) gcom.NullablePostAccessPoliciesRequestConditions {
339
+ func expandCloudAccessPolicyConditions (condition []any ) gcom.NullablePostAccessPoliciesRequestConditions {
340
340
var result gcom.PostAccessPoliciesRequestConditions
341
341
342
342
for _ , c := range condition {
343
- c := c .(map [string ]interface {} )
343
+ c := c .(map [string ]any )
344
344
for _ , as := range c ["allowed_subnets" ].(* schema.Set ).List () {
345
345
result .AllowedSubnets = append (result .AllowedSubnets , as .(string ))
346
346
}
@@ -349,14 +349,14 @@ func expandCloudAccessPolicyConditions(condition []interface{}) gcom.NullablePos
349
349
return * gcom .NewNullablePostAccessPoliciesRequestConditions (& result )
350
350
}
351
351
352
- func expandCloudAccessPolicyRealm (realm []interface {} ) []gcom.PostAccessPoliciesRequestRealmsInner {
352
+ func expandCloudAccessPolicyRealm (realm []any ) []gcom.PostAccessPoliciesRequestRealmsInner {
353
353
var result []gcom.PostAccessPoliciesRequestRealmsInner
354
354
355
355
for _ , r := range realm {
356
- r := r .(map [string ]interface {} )
356
+ r := r .(map [string ]any )
357
357
labelPolicy := []gcom.PostAccessPoliciesRequestRealmsInnerLabelPoliciesInner {}
358
358
for _ , lp := range r ["label_policy" ].(* schema.Set ).List () {
359
- lp := lp .(map [string ]interface {} )
359
+ lp := lp .(map [string ]any )
360
360
labelPolicy = append (labelPolicy , gcom.PostAccessPoliciesRequestRealmsInnerLabelPoliciesInner {
361
361
Selector : lp ["selector" ].(string ),
362
362
})
0 commit comments