Created
March 6, 2018 18:50
-
-
Save jwreagor/21b8515444b4145742a12efe051a6b8e to your computer and use it in GitHub Desktop.
Example Terraform configuration w/ TSG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
instance_name_prefix = "cheap-" | |
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 | |
health_check_interval = 20 | |
} | |
output "template_id" { | |
value = "${triton_instance_template.template.id}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment