Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
add sudo to new nfs mount locking
Browse files Browse the repository at this point in the history
  • Loading branch information
badarsebard committed Mar 3, 2022
1 parent 1913f3d commit c3df667
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTNAME=local
NAMESPACE=badarsebard
NAME=xsoar
BINARY=terraform-provider-${NAME}
VERSION=0.3.12
VERSION=0.3.13
OS=${MY_OS}
ARCH=${MY_ARCH}

Expand Down
4 changes: 2 additions & 2 deletions xsoar/resource_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (r resourceHost) Create(ctx context.Context, req tfsdk.CreateResourceReques
return
}
defer session.Close()
err = session.Run(fmt.Sprintf(`touch %s/xsoar_host_install.lock`, plan.NFSMount.Value))
err = session.Run(fmt.Sprintf(`sudo touch %s/xsoar_host_install.lock`, plan.NFSMount.Value))
if err != nil {
resp.Diagnostics.AddError(
"Error creating lock file",
Expand Down Expand Up @@ -363,7 +363,7 @@ func (r resourceHost) Create(ctx context.Context, req tfsdk.CreateResourceReques
return
}
defer session.Close()
err = session.Run(fmt.Sprintf(`rm %s/xsoar_host_install.lock`, plan.NFSMount.Value))
err = session.Run(fmt.Sprintf(`sudo rm %s/xsoar_host_install.lock`, plan.NFSMount.Value))
if err != nil {
resp.Diagnostics.AddError(
"Error creating lock file",
Expand Down

0 comments on commit c3df667

Please sign in to comment.