Narrow group 1 managed resources

This commit is contained in:
2026-11-14 13:42:43 +09:00
parent f1f60740ae
commit 94a5c2bf55
7 changed files with 12 additions and 117 deletions
+3 -16
View File
@@ -35,12 +35,9 @@ import {
}
import {
for_each = {
cloudtrail = local.bucket_names.cloudtrail
flowlogs = local.bucket_names.flowlogs
}
to = module.audit_logging_encryption.aws_s3_bucket_lifecycle_configuration.this[each.key]
id = each.value
for_each = local.bucket_names
to = module.audit_logging_encryption.aws_s3_bucket_lifecycle_configuration.this[each.key]
id = each.value
}
import {
@@ -59,16 +56,6 @@ import {
id = each.value.name
}
import {
to = module.audit_logging_encryption.aws_cloudwatch_dashboard.cost_check
id = "CostCheck"
}
import {
to = module.audit_logging_encryption.aws_sns_topic.notify_me
id = "arn:aws:sns:us-east-1:${var.account_id}:NotifyMe"
}
import {
to = module.audit_logging_encryption.aws_cloudwatch_metric_alarm.billing
id = "awsbilling-AWS-Service-Charges-total"
+2 -25
View File
@@ -1,25 +1,10 @@
locals {
bucket_names = {
obsidian = "${var.account_id}-obsidian-contents"
cloudtrail = "aws-cloudtrail-logs-${var.account_id}-97f3dbeb"
flowlogs = "kazu634-flowlogs"
}
log_groups = {
ecs_a49f = {
name = "/aws/ecs/default/nginx-a49f-48d8"
tags = {
AmazonECSManaged = "true"
category = "ecs-test"
}
}
ecs_d2a0 = {
name = "/aws/ecs/default/nginx-d2a0-c9dc"
tags = {
AmazonECSManaged = "true"
category = "ecs-test"
}
}
vpc_flowlogs = {
name = "nw-vpcflowlogs"
retention_in_days = 14
@@ -40,19 +25,11 @@ module "audit_logging_encryption" {
account_id = var.account_id
bucket_names = local.bucket_names
bucket_tags = {
obsidian = {
Env = "Obsidian"
}
}
trail_name = "management-events"
kms_alias_name = "alias/vault-kms"
log_groups = local.log_groups
dashboard_name = "CostCheck"
dashboard_nat_gateway_id = "nat-13131172004a3e65b"
sns_topic_name = "NotifyMe"
billing_alarm_name = "awsbilling-AWS-Service-Charges-total"
billing_alarm_name = "awsbilling-AWS-Service-Charges-total"
billing_alarm_action_arns = ["arn:aws:sns:us-east-1:${var.account_id}:NotifyMe"]
}