diff --git a/terraform/010-cluster/main.tf b/terraform/010-cluster/main.tf index f627113..ff5a6cf 100644 --- a/terraform/010-cluster/main.tf +++ b/terraform/010-cluster/main.tf @@ -44,17 +44,18 @@ data "aws_ami" "ecs_ami" { * Create auto-scaling group */ module "asg" { - source = "github.com/silinternational/terraform-modules//aws/asg?ref=8.13.2" - app_name = var.app_name - app_env = var.app_env - aws_instance = var.aws_instance - private_subnet_ids = module.vpc.private_subnet_ids - default_sg_id = module.vpc.vpc_default_sg_id - ecs_instance_profile_id = var.ecs_instance_profile_id - ecs_cluster_name = var.ecs_cluster_name - ami_id = data.aws_ami.ecs_ami.id - additional_user_data = var.asg_additional_user_data - tags = var.tags + source = "github.com/silinternational/terraform-modules//aws/asg?ref=8.14.1" + app_name = var.app_name + app_env = var.app_env + aws_instance = var.aws_instance + private_subnet_ids = module.vpc.private_subnet_ids + default_sg_id = module.vpc.vpc_default_sg_id + ecs_instance_profile_id = var.ecs_instance_profile_id + ecs_cluster_name = var.ecs_cluster_name + ami_id = data.aws_ami.ecs_ami.id + additional_user_data = var.asg_additional_user_data + tags = var.tags + enable_ec2_detailed_monitoring = var.enable_ec2_detailed_monitoring } /* diff --git a/terraform/010-cluster/vars.tf b/terraform/010-cluster/vars.tf index e55ae82..4171932 100644 --- a/terraform/010-cluster/vars.tf +++ b/terraform/010-cluster/vars.tf @@ -115,3 +115,9 @@ variable "log_retention_in_days" { type = number default = 30 } + +variable "enable_ec2_detailed_monitoring" { + description = "Whether to enable detailed monitoring for EC2 instances" + type = bool + default = true +} diff --git a/test/010-cluster.tf b/test/010-cluster.tf index 3630c03..5bcfc46 100644 --- a/test/010-cluster.tf +++ b/test/010-cluster.tf @@ -1,15 +1,16 @@ module "cluster" { source = "../terraform/010-cluster" - app_name = "" - app_env = "" - aws_instance = { a = "b" } - aws_zones = [""] - cert_domain_name = "" - create_nat_gateway = true - ecs_cluster_name = "" - ecs_instance_profile_id = "" - idp_name = "" - asg_additional_user_data = "" - tags = {} + app_name = "" + app_env = "" + aws_instance = { a = "b" } + aws_zones = [""] + cert_domain_name = "" + create_nat_gateway = true + ecs_cluster_name = "" + ecs_instance_profile_id = "" + idp_name = "" + asg_additional_user_data = "" + tags = {} + enable_ec2_detailed_monitoring = true }