Skip to content

Commit

Permalink
Inline policy for opensearch
Browse files Browse the repository at this point in the history
  • Loading branch information
antroy-madetech committed Sep 9, 2024
1 parent 7a50b1d commit 7dff0f7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions opensearch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ data "aws_region" "current" {}
resource "aws_kms_key" "cloudwatch_log_group_kms_key" {
description = "KMS Key for ${var.name}-${var.environment} CloudWatch Log encryption"
enable_key_rotation = true
tags = local.tags
}

resource "aws_kms_key_policy" "opensearch_to_cloudwatch" {
key_id = aws_kms_key.cloudwatch_log_group_kms_key.key_id
policy = jsonencode({
Id = "OpenSearchToCloudWatch"
Statement = [
Expand All @@ -32,6 +27,7 @@ resource "aws_kms_key_policy" "opensearch_to_cloudwatch" {
]
Version = "2012-10-17"
})
tags = local.tags
}

resource "aws_cloudwatch_log_group" "opensearch_log_group_index_slow_logs" {
Expand Down

0 comments on commit 7dff0f7

Please sign in to comment.