bsd-server01.tf (561B)
1 resource "digitalocean_droplet" "bsd-server01" { 2 image = "freebsd-12-x64-zfs" 3 name = "bsd-server01" 4 region = "nyc3" 5 size = "s-1vcpu-1gb" 6 private_networking = true 7 ssh_keys = [ 8 data.digitalocean_ssh_key.terraform.id 9 ] 10 11 connection { 12 host = self.ipv4_address 13 user = "freebsd" 14 type = "ssh" 15 private_key = file(var.pvt_key) 16 timeout = "2m" 17 } 18 19 provisioner "remote-exec" { 20 inline = [ 21 "export PATH=$PATH:/usr/bin", 22 # install nginx 23 "yes | sudo pkg update", 24 "yes | sudo pkg install nginx" 25 ] 26 } 27 }