Created
April 15, 2019 17:48
-
-
Save geekbass/0c39e96ad19c49ab3c5585fa53f9dd00 to your computer and use it in GitHub Desktop.
Revisions
-
Weston Bassler revised this gist
Apr 15, 2019 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,10 +45,6 @@ module "dcos-infrastructure" { num_public_agents = "${var.num_public_agents}" ssh_public_key_file = "${var.ssh_public_key_file}" } # Begin Outputs -
Weston Bassler created this gist
Apr 15, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,91 @@ # Find Public IP data "http" "whatismyip" { url = "http://whatismyip.akamai.com/" } # Begin Variables variable "aws_ami" { description = "AMI to use" default = "ami-4bf3d731" } variable "cluster_name" { description = "Name of your DC/OS Cluster" default = "dcosansible" } variable "num_masters" { description = "Number of Masters" default = "3" } variable "num_private_agents" { description = "Number of Private Agents" default = "3" } variable "num_public_agents" { description = "Number of Public Agents" default = "1" } variable "ssh_public_key_file" { description = "SSH Key Location" default = "~/.ssh/id_rsa.pub" } # Begin Modules module "dcos-infrastructure" { source = "dcos-terraform/infrastructure/aws" admin_ips = ["${data.http.whatismyip.body}/32"] aws_ami = "${var.aws_ami}" cluster_name = "${var.cluster_name}" num_masters = "${var.num_masters}" num_private_agents = "${var.num_private_agents}" num_public_agents = "${var.num_public_agents}" ssh_public_key_file = "${var.ssh_public_key_file}" tags = { owner = "wbassler" expiration = "4h" } } # Begin Outputs output "bootstraps" { description = "bootsrap IPs" value = "${join("\n", flatten(list(module.dcos-infrastructure.bootstrap.public_ip)))}" } output "bootstrap_private_ip" { description = "bootsrap IPs" value = "${module.dcos-infrastructure.bootstrap.private_ip}" } output "masters" { description = "masters IPs" value = "${join("\n", flatten(list(module.dcos-infrastructure.masters.public_ips)))}" } output "masters_private_ips" { description = "List of private IPs for Masters (for DCOS config)" value = "${join("\n", flatten(list(module.dcos-infrastructure.masters.private_ips)))}" } output "private_agents" { description = "Private Agents IPs" value = "${join("\n", flatten(list(module.dcos-infrastructure.private_agents.public_ips)))}" } output "public_agents" { description = "Public Agents IPs" value = "${join("\n", flatten(list(module.dcos-infrastructure.public_agents.public_ips)))}" } output "cluster-address" { value = "${module.dcos-infrastructure.lb.masters_dns_name}" } output "public-agents-loadbalancer" { value = "${module.dcos-infrastructure.lb.public_agents_dns_name}" }