@@ -407,15 +407,15 @@ func validateRequiredAttribute(
407
407
func validateHostGroups (ctx context.Context , hostGroupSet types.Set ) diag.Diagnostics {
408
408
var diags diag.Diagnostics
409
409
410
- var hostGroups []string
410
+ var hostGroups []types. String
411
411
412
412
diags .Append (hostGroupSet .ElementsAs (ctx , & hostGroups , false )... )
413
413
if diags .HasError () {
414
414
return diags
415
415
}
416
416
417
417
for _ , id := range hostGroups {
418
- if len (id ) == 0 {
418
+ if ! id . IsUnknown () && len (id . ValueString () ) == 0 {
419
419
diags .AddAttributeError (
420
420
path .Root ("host_groups" ),
421
421
"Error validating host group" ,
@@ -431,15 +431,15 @@ func validateHostGroups(ctx context.Context, hostGroupSet types.Set) diag.Diagno
431
431
func validateIOARuleGroups (ctx context.Context , ioaRuleGroupSet types.Set ) diag.Diagnostics {
432
432
var diags diag.Diagnostics
433
433
434
- var ioaRuleGroups []string
434
+ var ioaRuleGroups []types. String
435
435
436
436
diags .Append (ioaRuleGroupSet .ElementsAs (ctx , & ioaRuleGroups , false )... )
437
437
if diags .HasError () {
438
438
return diags
439
439
}
440
440
441
441
for _ , id := range ioaRuleGroups {
442
- if len (id ) == 0 {
442
+ if ! id . IsUnknown () && len (id . ValueString () ) == 0 {
443
443
diags .AddAttributeError (
444
444
path .Root ("ioa_rule_groups" ),
445
445
"Error validating ioa rule group" ,
0 commit comments