terraform-provisioner-safe-remote-exec

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

terraform-provisioner-safe-remote-exec

terraform-provisioner-safe-remote-exec is enhanced version of remote-exec provisioner from the terraform. It introduces an environment to provide controlled execution of commands on the remote hosts. This is achieved by introducing a new parameter timeout in the schema. The configured timeout will be in the seconds. The remote command execution will be stopped/killed by sending SIGKILL to remote command if the command excution time exceeds the timout limit configured

Example

resource "null_resource" "safe-remote-exec-test" {
  connection {
    type        = "ssh"
    user        = var.user
    host        = var.ip
    password    = var.pw
  }

  provisioner "safe-remote-exec" {
    inline = ["ping localhost -c 10", "sleep 3", "ping localhost -c 15", "touch test.txt"]
    timeout = 45
  }
}

Build

make clean; make build

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
ssh

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL