Created
March 18, 2021 00:02
-
-
Save hobroker/693865954458b58b6ef5004089ac133d to your computer and use it in GitHub Desktop.
terraform ssh inline command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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