Skip to content

Instantly share code, notes, and snippets.

@hobroker
Created March 18, 2021 00:02
Show Gist options
  • Save hobroker/693865954458b58b6ef5004089ac133d to your computer and use it in GitHub Desktop.
Save hobroker/693865954458b58b6ef5004089ac133d to your computer and use it in GitHub Desktop.
terraform ssh inline command
resource "null_resource" "volume" {
connection {
type = "ssh"
host = "ip"
user = "user"
private_key = file("~/.ssh/id_rsa")
}
triggers = {
dir = var.dir_path
}
provisioner "remote-exec" {
inline = [
"echo hi"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment