Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable detailed monitoring #278

Merged
merged 7 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading