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

Csr/dsos 2307/initial csr monitoring #3672

Merged
merged 10 commits into from
Oct 23, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ resource "aws_ssm_document" "cloud_watch_agent" {
)
}

resource "aws_ssm_document" "ami_build" {
# commented out for now as this currently returns an error on apply
/* resource "aws_ssm_document" "ami_build" {
name = "ami-build"
document_type = "Automation"
document_format = "YAML"
Expand All @@ -52,4 +53,4 @@ resource "aws_ssm_document" "ami_build" {
Name = "ami-build"
},
)
}
} */
12 changes: 9 additions & 3 deletions terraform/environments/corporate-staff-rostering/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ locals {
enable_ec2_self_provision = true
enable_ec2_oracle_enterprise_managed_server = true
enable_ec2_user_keypair = true
cloudwatch_metric_alarms = {}
cloudwatch_metric_alarms_default_actions = ["csr_pagerduty"]
route53_resolver_rules = {
# outbound-data-and-private-subnets = ["azure-fixngo-domain"] # already set by nomis account
}
iam_policies_filter = ["ImageBuilderS3BucketWriteAndDeleteAccessPolicy"]
iam_policies_ec2_default = ["EC2S3BucketWriteAndDeleteAccessPolicy", "ImageBuilderS3BucketWriteAndDeleteAccessPolicy"]
s3_iam_policies = ["EC2S3BucketWriteAndDeleteAccessPolicy"]
sns_topics = {}
sns_topics = {
pagerduty_integrations = {
csr_pagerduty = "csr_alarms"
}
}
}

baseline_acm_certificates = {}
Expand Down Expand Up @@ -78,6 +82,8 @@ locals {
jumpserver = local.security_groups.jumpserver
}

baseline_sns_topics = {}
baseline_ssm_parameters = {}

baseline_sns_topics = {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
locals {

app_ec2_cloudwatch_metric_alarms = merge(
module.baseline_presets.cloudwatch_metric_alarms.ec2,
module.baseline_presets.cloudwatch_metric_alarms.ec2_cwagent_windows
)

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ locals {
}
}

database_ec2_cloudwatch_metric_alarms = merge(
module.baseline_presets.cloudwatch_metric_alarms.ec2,
module.baseline_presets.cloudwatch_metric_alarms.ec2_cwagent_linux
)

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ locals {
user_data_raw = base64encode(file("./templates/test-user-data.yaml"))
instance_profile_policies = concat(module.baseline_presets.ec2_instance.config.default.instance_profile_policies, ["CSRWebServerPolicy"])
})

cloudwatch_metric_alarms = local.app_ec2_cloudwatch_metric_alarms
instance = merge(module.baseline_presets.ec2_instance.instance.default, {
vpc_security_group_ids = ["app", "domain", "jumpserver"]
instance_type = "t3.medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,17 @@ locals {
}

baseline_ec2_autoscaling_groups = {
prepprod-tst-1 = {
pp-web-tst-1 = {
config = merge(module.baseline_presets.ec2_instance.config.default, {
ami_name = "hmpps_windows_server_2022_release_2023-*" # Microsoft Windows Server 2019 Base
ami_name = "hmpps_windows_server_2022_release_2023-*" # Microsoft Windows Server 2022 Base
ami_owner = "754260907303"
ebs_volumes_copy_all_from_ami = false
user_data_raw = base64encode(file("./templates/test-user-data.yaml"))
instance_profile_policies = concat(module.baseline_presets.ec2_instance.config.default.instance_profile_policies, ["CSRWebServerPolicy"])
})

instance = merge(module.baseline_presets.ec2_instance.instance.default, {
vpc_security_group_ids = ["migration-web-sg", "domain-controller"]
vpc_security_group_ids = ["web", "domain", "jumpserver"]
instance_type = "t3.medium"

})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
locals {

web_ec2_cloudwatch_metric_alarms = merge(
module.baseline_presets.cloudwatch_metric_alarms.ec2,
module.baseline_presets.cloudwatch_metric_alarms.ec2_cwagent_windows
)

}
Loading