mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Move all files from 'aws-tf-ansible' to 'aws-tf-traefik' to reflect removal of Ansible from the environment (due to CoreOS switch) Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
33 lines
1.3 KiB
HCL
33 lines
1.3 KiB
HCL
# Launch an instance to serve as a manager
|
|
resource "aws_instance" "manager" {
|
|
ami = "${data.aws_ami.worker_ami.id}"
|
|
instance_type = "${var.mgr_flavor}"
|
|
key_name = "${var.keypair}"
|
|
vpc_security_group_ids = ["${aws_security_group.mgmt_sg.id}"]
|
|
subnet_id = "${aws_subnet.traefik_pub_subnet.id}"
|
|
depends_on = ["aws_internet_gateway.traefik_gw"]
|
|
tags {
|
|
Name = "manager"
|
|
tool = "terraform"
|
|
demo = "traefik"
|
|
area = "compute"
|
|
role = "manager"
|
|
}
|
|
}
|
|
|
|
# Launch one or more instances to serve as worker nodes
|
|
resource "aws_instance" "worker" {
|
|
ami = "${data.aws_ami.worker_ami.id}"
|
|
count = "${var.num_wkr_nodes}"
|
|
instance_type = "${var.wkr_flavor}"
|
|
key_name = "${var.keypair}"
|
|
vpc_security_group_ids = ["${aws_security_group.web_sg.id}"]
|
|
subnet_id = "${aws_subnet.traefik_pub_subnet.id}"
|
|
depends_on = ["aws_internet_gateway.traefik_gw"]
|
|
tags {
|
|
tool = "terraform"
|
|
demo = "traefik"
|
|
area = "compute"
|
|
role = "worker"
|
|
}
|
|
}
|