@@ -432,7 +432,7 @@ func (r *ProtocolsCIFSShareResource) Create(ctx context.Context, req resource.Cr
432
432
body .SVM .Name = data .SVMName .ValueString ()
433
433
body .Path = data .Path .ValueString ()
434
434
435
- configHasDefaultAcl := false
435
+ configHasDefaultACL := false
436
436
if ! data .Acls .IsUnknown () {
437
437
aclsList := []interfaces.Acls {}
438
438
elements := make ([]types.Object , 0 , len (data .Acls .Elements ()))
@@ -453,7 +453,7 @@ func (r *ProtocolsCIFSShareResource) Create(ctx context.Context, req resource.Cr
453
453
interfacesAcls .Type = acls .Type
454
454
interfacesAcls .UserOrGroup = acls .UserOrGroup
455
455
if acls .UserOrGroup == "Everyone" && acls .Permission == "full_control" {
456
- configHasDefaultAcl = true
456
+ configHasDefaultACL = true
457
457
}
458
458
aclsList = append (aclsList , interfacesAcls )
459
459
}
@@ -557,7 +557,7 @@ func (r *ProtocolsCIFSShareResource) Create(ctx context.Context, req resource.Cr
557
557
} else {
558
558
for _ , acls := range restInfo .Acls {
559
559
//If the config file does not have acl set user_or_group as "Everyone / Full Control", the API will create one by default. Need to delete it if user does not want one.
560
- if acls .UserOrGroup == "Everyone" && acls .Permission == "full_control" && ! configHasDefaultAcl {
560
+ if acls .UserOrGroup == "Everyone" && acls .Permission == "full_control" && ! configHasDefaultACL {
561
561
svm , err := interfaces .GetSvmByName (errorHandler , * client , data .SVMName .ValueString ())
562
562
if err != nil {
563
563
return
@@ -744,21 +744,21 @@ func (r *ProtocolsCIFSShareResource) Update(ctx context.Context, req resource.Up
744
744
return
745
745
}
746
746
for index , planACL := range planeAcls {
747
- var planAclElement ProtocolsCIFSShareResourceAcls
748
- diags := planACL .As (ctx , & planAclElement , basetypes.ObjectAsOptions {})
747
+ var planACLElement ProtocolsCIFSShareResourceAcls
748
+ diags := planACL .As (ctx , & planACLElement , basetypes.ObjectAsOptions {})
749
749
if diags .HasError () {
750
750
resp .Diagnostics .Append (diags ... )
751
751
return
752
752
}
753
753
// if 'userOrGroup' and 'type' matches, then we know it's not a create action. If permission is same, then break the loop because nothing to update.
754
- if stateACLElement .UserOrGroup == planAclElement .UserOrGroup && stateACLElement .Type == planAclElement .Type {
755
- if stateACLElement .Permission == planAclElement .Permission {
754
+ if stateACLElement .UserOrGroup == planACLElement .UserOrGroup && stateACLElement .Type == planACLElement .Type {
755
+ if stateACLElement .Permission == planACLElement .Permission {
756
756
break
757
757
} else {
758
758
// update the acls since permission is different
759
759
interfacesAcls := interfaces.ProtocolsCIFSShareACLResourceBodyDataModelONTAP {}
760
- interfacesAcls .Permission = planAclElement .Permission
761
- err = interfaces .UpdateProtocolsCIFSShareACL (errorHandler , * client , interfacesAcls , svm .UUID , plan .Name .ValueString (), planAclElement .UserOrGroup , planAclElement .Type )
760
+ interfacesAcls .Permission = planACLElement .Permission
761
+ err = interfaces .UpdateProtocolsCIFSShareACL (errorHandler , * client , interfacesAcls , svm .UUID , plan .Name .ValueString (), planACLElement .UserOrGroup , planACLElement .Type )
762
762
if err != nil {
763
763
return
764
764
}
0 commit comments