Forked from toshimaru/terraform-ssh-remote-exec.tf
Created
February 21, 2020 00:24
-
-
Save lbrealdev/af325860a773428456bbdd5bb5eba9c4 to your computer and use it in GitHub Desktop.
How to connect to server via SSH and use remote-exec provisioner.
This file contains 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 "digitalocean_droplet" "web" { | |
image = "ubuntu-16-04-x64" | |
name = "web-1" | |
region = "sgp1" | |
size = "512mb" | |
ssh_keys = [12345] | |
connection { | |
type = "ssh" | |
user = "root" | |
private_key = "${file("~/.ssh/id_rsa")}" | |
} | |
provisioner "remote-exec" { | |
inline = [ | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment