Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Created May 4, 2018 17:07
Show Gist options
  • Save jwreagor/7dca9d713efd3140ee0787cd573d8eda to your computer and use it in GitHub Desktop.
Save jwreagor/7dca9d713efd3140ee0787cd573d8eda 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 = "bash script 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