Skip to content

Instantly share code, notes, and snippets.

@badri
Last active December 3, 2018 00:01
Show Gist options
  • Save badri/3659565662d1b3fe78c47c70d3f41b30 to your computer and use it in GitHub Desktop.
Save badri/3659565662d1b3fe78c47c70d3f41b30 to your computer and use it in GitHub Desktop.
Terraform script
resource "digitalocean_ssh_key" "default" {
name = "Terraform Example"
public_key = "${file("/scripts/id_rsa.pub")}"
}
resource "digitalocean_droplet" "web" {
image = "centos-7-x64"
name = "web-1"
region = "tor1"
size = "s-1vcpu-1gb"
ssh_keys = ["${digitalocean_ssh_key.default.fingerprint}"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment