Adding in cp leader asg

pull/516/head
Jonathan Simon 2019-11-24 21:37:34 -08:00
parent eedc52d2f6
commit 0116a8dbc7
1 changed files with 41 additions and 41 deletions

View File

@ -1,5 +1,5 @@
locals { locals {
service = "${var.prefix}-${var.name}-cp" service = "cp-${var.prefix}-${var.name}"
} }
data "aws_subnet_ids" "private" { data "aws_subnet_ids" "private" {
@ -19,49 +19,49 @@ data "aws_ami" "base" {
} }
} }
# module "asg" { module "asg" {
# source = "terraform-aws-modules/autoscaling/aws" source = "terraform-aws-modules/autoscaling/aws"
# version = "~> 3.0" version = "~> 3.0"
# name = "cp-leader" name = "${local.service}-leader-asg"
# # Launch configuration # Launch configuration
# lc_name = "example-lc" lc_name = "${local.service}-lc"
# image_id = "ami-ebd02392" image_id = "${data.aws_ami.base.id}"
# instance_type = "t2.micro" instance_type = "t3.micro"
# security_groups = ["sg-12345678"] security_groups = ["sg-0179764763f4aeb43"]
# root_block_device = [ root_block_device = [
# { {
# volume_size = "8" volume_size = "8"
# volume_type = "gp2" volume_type = "gp2"
# }, },
# ] ]
# # Auto scaling group # Auto scaling group
# asg_name = "example-asg" asg_name = "${local.service}-leader-asg"
# vpc_zone_identifier = ["subnet-1235678", "subnet-87654321"] vpc_zone_identifier = ["${data.aws_subnet_ids.private.ids}"]
# health_check_type = "EC2" health_check_type = "EC2"
# min_size = 1 min_size = 1
# max_size = 1 max_size = 1
# desired_capacity = 1 desired_capacity = 1
# wait_for_capacity_timeout = 0 wait_for_capacity_timeout = 0
# tags = [ tags = [
# { {
# key = "Environment" key = "Environment"
# value = "dev" value = "${local.environment}"
# propagate_at_launch = true propagate_at_launch = true
# }, },
# { {
# key = "Project" key = "Name"
# value = "megasecret" value = "${var.prefix}-${var.name}"
# propagate_at_launch = true propagate_at_launch = true
# }, },
# ] ]
# tags_as_map = { # tags_as_map = {
# extra_tag1 = "extra_value1" # extra_tag1 = "extra_value1"
# extra_tag2 = "extra_value2" # extra_tag2 = "extra_value2"
# } # }
# } }