Skip to content

Instantly share code, notes, and snippets.

@sergeykuzmich
Last active February 13, 2019 21:06
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 sergeykuzmich/af83e278e447f9ea1b5e8519d6cef7ed to your computer and use it in GitHub Desktop.
Save sergeykuzmich/af83e278e447f9ea1b5e8519d6cef7ed to your computer and use it in GitHub Desktop.
Droplet definition with custom user_data
resource "digitalocean_domain" "default" {
name = "${var.domain}"
ip_address = "${digitalocean_droplet.default.ipv4_address}"
}
resource "digitalocean_droplet" "default" {
name = "${coalesce(var.droplet_name, var.domain)}"
image = "wordpress-18-04"
region = "${var.droplet_region}"
size = "${var.droplet_size}"
user_data = "${data.template_file.user_data.rendered}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment