(MODE-11365) minor module changes for no downtime.
This commit is contained in:
parent
1d6fcd6d8b
commit
ec503e7d6a
4 changed files with 6 additions and 6 deletions
|
|
@ -14,5 +14,5 @@ mono_alb_remote_state = "dev/tileserver-alb/terraform.tfstate"
|
|||
mono_keypair_remote_state = "dev/mono-keypair/terraform.tfstate"
|
||||
mono_efs_remote_state = "dev/mono-efs/terraform.tfstate"
|
||||
mono_region = "fra"
|
||||
version = "2.0"
|
||||
version = "2.1"
|
||||
state_bucket = "tg-state-eu-central-1"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ terragrunt = {
|
|||
path = "${find_in_parent_folders()}"
|
||||
}
|
||||
terraform {
|
||||
source = "git::ssh://git@github.com/monosolutions/terraform-modules.git//mono-tileserver"
|
||||
source = "/tmp/repo/deployment/modules/tileserver"
|
||||
}
|
||||
}
|
||||
region = "eu-central-1"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
resource "aws_launch_configuration" "launchconfiguration" {
|
||||
name_prefix = "maps-${var.environment}-"
|
||||
name_prefix = "maps-${var.environment}-${var.version}-"
|
||||
image_id = "${data.aws_ami.amazon_linux.id}"
|
||||
key_name = "${data.terraform_remote_state.mono_keypair.key_name}"
|
||||
iam_instance_profile = "${aws_iam_instance_profile.profile.name}"
|
||||
|
|
@ -19,7 +19,7 @@ resource "aws_launch_configuration" "launchconfiguration" {
|
|||
|
||||
resource "aws_autoscaling_group" "autoscalinggroup" {
|
||||
vpc_zone_identifier = ["${data.terraform_remote_state.mono_vpc.sn_private_a_id}"]
|
||||
name_prefix = "maps-${var.environment}-${var.version}"
|
||||
name = "maps-${aws_launch_configuration.launchconfiguration.name}"
|
||||
launch_configuration = "${aws_launch_configuration.launchconfiguration.name}"
|
||||
max_size = 5
|
||||
desired_capacity = 1
|
||||
|
|
@ -27,7 +27,7 @@ resource "aws_autoscaling_group" "autoscalinggroup" {
|
|||
health_check_grace_period = 300
|
||||
health_check_type = "ELB"
|
||||
force_delete = true
|
||||
termination_policies = ["OldestInstance"]
|
||||
termination_policies = ["OldestInstance", "OldestLaunchConfiguration"]
|
||||
|
||||
target_group_arns = ["${aws_alb_target_group.target_group_this.arn}"]
|
||||
enabled_metrics = ["GroupMinSize", "GroupMaxSize",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
resource "aws_alb_target_group" "target_group_this" {
|
||||
name_prefix = "maps-"
|
||||
name = "maps"
|
||||
port = "80"
|
||||
protocol = "HTTP"
|
||||
vpc_id = "${data.terraform_remote_state.mono_vpc.vpc_id[0]}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue