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

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
badarsebard committed Dec 21, 2021
1 parent 0190af6 commit 59486fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ builds:
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
# - freebsd
# - windows
- freebsd
- windows
- linux
# - darwin
- darwin
goarch:
- amd64
# - '386'
# - arm
# - arm64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
Expand Down
8 changes: 6 additions & 2 deletions xsoar/resource_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (r resourceHost) Create(ctx context.Context, req tfsdk.CreateResourceReques
select {
case _ = <-c1:
break
case <-time.After(60 * time.Second):
case <-time.After(300 * time.Second):
resp.Diagnostics.AddError(
"Error getting host",
"Could not get host before timeout",
Expand Down Expand Up @@ -620,15 +620,19 @@ func (r resourceHost) Delete(ctx context.Context, req tfsdk.DeleteResourceReques
}

// 3) Transfer installer to host server
var ignoreHostKey ssh.HostKeyCallback
ignoreHostKey = ssh.InsecureIgnoreHostKey()
clientConfig, _ := auth.PrivateKey(
state.SSHUser.Value,
state.SSHKeyFile.Value,
ssh.InsecureIgnoreHostKey(),
ignoreHostKey,
)
client := scp.NewClient(state.ServerUrl.Value, &clientConfig)

err = client.Connect()
if err != nil {
log.Println(err)
log.Println(clientConfig)
resp.Diagnostics.AddError(
"Error creating scp connection",
"Could not create scp connection: "+err.Error(),
Expand Down

0 comments on commit 59486fa

Please sign in to comment.