Remove DO token variable. Update readme and provisioner

This commit is contained in:
Mike Conrad
2024-09-24 21:47:59 -04:00
parent 43f6820f4a
commit cceeda2164
5 changed files with 22 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# Create a new SSH key
resource "digitalocean_ssh_key" "default" {
name = "Terraform Example"
public_key = file("~/.ssh/id_rsa.pub")
public_key = file("./tf-digitalocean.pub")
}
# Create a new Web Droplet in the nyc2 region
@ -16,11 +16,11 @@ resource "digitalocean_droplet" "web" {
host = digitalocean_droplet.web.ipv4_address
type = "ssh"
user = "root"
private_key = "${file("~/.ssh/id_rsa.pem")}"
private_key = "${file("./tf-digitalocean")}"
}
provisioner "remote-exec" {
inline = [ "cat /root/wireguard-config/client-config.conf" ]
inline = [ "cat /root/wireguard-conf/client-config.conf" ]
}
}