-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
20-kms-keys.tf
74 lines (60 loc) · 2.17 KB
/
20-kms-keys.tf
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# KMS key creation
resource "aws_kms_key" "kms_key_1" {
description = "KMS key for terraform state storage bucket"
deletion_window_in_days = var.kms_key_1_default_retention_days
enable_key_rotation = true
}
# AWS KMS alias creation
resource "aws_kms_alias" "kms_key_1_alias" {
name = "alias/terraform-bucket-key-gitlab-1"
target_key_id = aws_kms_key.kms_key_1.key_id
depends_on = [aws_kms_key.kms_key_1]
}
# KMS key creation
resource "aws_kms_key" "kms_key_2" {
description = "KMS key for DynamoDB table encryption"
deletion_window_in_days = var.kms_key_2_default_retention_days
enable_key_rotation = true
}
# AWS KMS alias creation
resource "aws_kms_alias" "kms_key_2_alias" {
name = "alias/dynamodb-table-encryption-gitlab-1"
target_key_id = aws_kms_key.kms_key_2.key_id
depends_on = [aws_kms_key.kms_key_2]
}
# KMS key creation
resource "aws_kms_key" "kms_key_3" {
description = "KMS key for DynamoDB table encryption"
deletion_window_in_days = var.kms_key_3_default_retention_days
enable_key_rotation = true
}
# AWS KMS alias creation
resource "aws_kms_alias" "kms_key_3_alias" {
name = "alias/performance-insights-rds-1"
target_key_id = aws_kms_key.kms_key_3.key_id
depends_on = [aws_kms_key.kms_key_3]
}
# KMS key creation
resource "aws_kms_key" "kms_key_4" {
description = "KMS key for EBS volume encryption"
deletion_window_in_days = var.kms_key_4_default_retention_days
enable_key_rotation = true
}
# AWS KMS alias creation
resource "aws_kms_alias" "kms_key_4_alias" {
name = "alias/ebs-1-volume-encryption-gitlab-1"
target_key_id = aws_kms_key.kms_key_4.key_id
depends_on = [aws_kms_key.kms_key_4]
}
# KMS key creation
resource "aws_kms_key" "kms_key_5" {
description = "KMS key for backup EBS volume encryption"
deletion_window_in_days = var.kms_key_5_default_retention_days
enable_key_rotation = true
}
# AWS KMS alias creation
resource "aws_kms_alias" "kms_key_5_alias" {
name = "alias/backup-ebs-volume-1-encryption-gitlab-1"
target_key_id = aws_kms_key.kms_key_5.key_id
depends_on = [aws_kms_key.kms_key_5]
}