-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathkms.tf
More file actions
36 lines (32 loc) · 776 Bytes
/
kms.tf
File metadata and controls
36 lines (32 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# KMS key and alias
locals {
kms_key_alias = "alias/openmetadata"
kms_key_id = aws_kms_alias.this.target_key_arn
}
resource "aws_kms_key" "this" {
description = "An example symmetric encryption KMS key"
enable_key_rotation = true
deletion_window_in_days = 7
}
resource "aws_kms_alias" "this" {
name = local.kms_key_alias
target_key_id = aws_kms_key.this.key_id
}
resource "aws_kms_key_policy" "this" {
key_id = aws_kms_key.this.id
policy = jsonencode({
Version = "2012-10-17"
Id = "default"
Statement = [
{
Sid = "Enable IAM User Permissions"
Effect = "Allow"
Principal = {
AWS = "*"
},
Action = "kms:*"
Resource = "*"
}
]
})
}