Skip to content

Instantly share code, notes, and snippets.

@ngpestelos
Last active October 28, 2016 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngpestelos/584954dcb1617bb48510c818e1ab13ab to your computer and use it in GitHub Desktop.
Save ngpestelos/584954dcb1617bb48510c818e1ab13ab to your computer and use it in GitHub Desktop.
variable "do_token" {}
provider "digitalocean" {
token = "${var.do_token}"
}
resource "digitalocean_droplet" "gitlab-selfhosted" {
image="coreos-stable"
name="gitlab"
region="sfo2"
size="2gb"
ssh_keys=["<your-ssh-fingerprint-here>"]
user_data="${file("user_data/gitlab-selfhosted.yml")}"
}
resource "digitalocean_record" "gitlab-selfhosted" {
domain="<your-domain-here>"
type="A"
name="<your-hostname-here>"
value="${digitalocean_droplet.gitlab-selfhosted.ipv4_address}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment