Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Last active April 16, 2018 20:14
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 jwreagor/84461299df8fdff69510b25fb6d3d3a6 to your computer and use it in GitHub Desktop.
Save jwreagor/84461299df8fdff69510b25fb6d3d3a6 to your computer and use it in GitHub Desktop.
provider "triton" {
insecure_skip_tls_verify = true
}
data "triton_network" "public" {
name = "Joyent-SDC-Public"
}
data "triton_image" "lts" {
name = "base-64-lts"
most_recent = true
}
resource "triton_instance_template" "template" {
template_name = "cheap-template-1"
image = "${data.triton_image.lts.id}"
package = "g4-highcpu-1G"
networks = ["${data.triton_network.public.id}"]
firewall_enabled = true
tags {
admin = "cheap"
foo = "bar"
}
metadata {
hello = "again"
}
userdata = "instance data goes here"
}
resource "triton_service_group" "group" {
group_name = "cheap-group-1"
template = "${triton_instance_template.template.id}"
capacity = 3
}
output "template_id" {
value = "${triton_instance_template.template.id}"
}
output "group_id" {
value = "${triton_service_group.group.id}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment