Skip to content

Commit

Permalink
Merge pull request #278 from silinternational/feature-monitoring
Browse files Browse the repository at this point in the history
Option to disable detailed monitoring
  • Loading branch information
Praveenraj-K authored Dec 9, 2024
2 parents 0dfe550 + c815de1 commit 351729d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
23 changes: 12 additions & 11 deletions terraform/010-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*
Expand Down
6 changes: 6 additions & 0 deletions terraform/010-cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
23 changes: 12 additions & 11 deletions test/010-cluster.tf
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 351729d

Please sign in to comment.