Skip to content

Commit 89eaca5

Browse files
benjaminvalienteBenjamin Valiente (Contractor)github-actions[bot]
authored
feat: add kubernetes events log group (#257)
* feat: add kubernetes events log group * terraform-docs: automated action --------- Co-authored-by: Benjamin Valiente (Contractor) <benjamin.valiente@thoughtbot.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent eda3e44 commit 89eaca5

4 files changed

Lines changed: 8 additions & 14 deletions

File tree

aws/platform/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ You can then use it to manually edit the aws-auth ConfigMap:
141141
| <a name="module_common_platform"></a> [common\_platform](#module\_common\_platform) | ../../platform | n/a |
142142
| <a name="module_dns_service_account_role"></a> [dns\_service\_account\_role](#module\_dns\_service\_account\_role) | ./modules/dns-service-account-role | n/a |
143143
| <a name="module_ebs_csi_driver_service_account_role"></a> [ebs\_csi\_driver\_service\_account\_role](#module\_ebs\_csi\_driver\_service\_account\_role) | ./modules/ebs-csi-driver-service-account-role | n/a |
144-
| <a name="module_kubernetes_events_cloudwatch_logs"></a> [kubernetes\_events\_cloudwatch\_logs](#module\_kubernetes\_events\_cloudwatch\_logs) | ./modules/cloudwatch-logs | n/a |
145144
| <a name="module_network"></a> [network](#module\_network) | ../network-data | n/a |
146145
| <a name="module_prometheus_service_account_role"></a> [prometheus\_service\_account\_role](#module\_prometheus\_service\_account\_role) | ./modules/prometheus-service-account-role | n/a |
147146
| <a name="module_secrets_store_provider"></a> [secrets\_store\_provider](#module\_secrets\_store\_provider) | ./modules/secrets-store-provider | n/a |

aws/platform/main.tf

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,6 @@ module "cloudwatch_logs" {
135135
skip_destroy = var.logs_skip_destroy
136136
}
137137

138-
module "kubernetes_events_cloudwatch_logs" {
139-
source = "./modules/cloudwatch-logs"
140-
141-
aws_namespace = [module.cluster_name.full]
142-
aws_tags = var.aws_tags
143-
cluster_full_name = "${module.cluster_name.full}/kubernetes-events"
144-
k8s_namespace = var.k8s_namespace
145-
log_group_prefix = var.logs_prefix
146-
oidc_issuer = data.aws_ssm_parameter.oidc_issuer.value
147-
retention_in_days = var.logs_retention_in_days
148-
skip_destroy = var.logs_skip_destroy
149-
}
150-
151138
module "cluster_autoscaler_service_account_role" {
152139
source = "./modules/cluster-autoscaler-service-account-role"
153140

aws/platform/modules/cloudwatch-logs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
| Name | Type |
2424
|------|------|
25+
| [aws_cloudwatch_log_group.kubernetes_events](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
2526
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
2627
| [aws_iam_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
2728
| [aws_iam_role_policy_attachment.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |

aws/platform/modules/cloudwatch-logs/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ resource "aws_cloudwatch_log_group" "this" {
1515
tags = var.aws_tags
1616
}
1717

18+
resource "aws_cloudwatch_log_group" "kubernetes_events" {
19+
name = "${var.log_group_prefix}/${var.cluster_full_name}/kubernetes-events"
20+
retention_in_days = var.retention_in_days
21+
skip_destroy = var.skip_destroy
22+
tags = var.aws_tags
23+
}
24+
1825
resource "aws_iam_policy" "this" {
1926
name = module.fluent_bit_service_account_role.name
2027
policy = data.aws_iam_policy_document.this.json

0 commit comments

Comments
 (0)