-
Notifications
You must be signed in to change notification settings - Fork 0
/
kms.tf
51 lines (44 loc) · 1.65 KB
/
kms.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
resource "aws_kms_key" "dynamodb_us_east_1" {
provider = aws.us_east_1
description = "A key for the dynamodb tables for the API application"
enable_key_rotation = true
tags = merge(local.common_tags)
}
resource "aws_kms_alias" "dynamodb_us_east_1" {
provider = aws.us_east_1
name_prefix = "alias/api/dynamodb"
target_key_id = aws_kms_key.dynamodb_us_east_1.key_id
}
resource "aws_kms_key" "dynamodb_us_east_2" {
provider = aws.us_east_2
description = "A key for the dynamodb tables for the API application"
enable_key_rotation = true
tags = merge(local.common_tags)
}
resource "aws_kms_alias" "dynamodb_us_east_2" {
provider = aws.us_east_2
name_prefix = "alias/api/dynamodb"
target_key_id = aws_kms_key.dynamodb_us_east_2.key_id
}
resource "aws_kms_key" "dynamodb_us_west_1" {
provider = aws.us_west_1
description = "A key for the dynamodb tables for the API application"
enable_key_rotation = true
tags = merge(local.common_tags)
}
resource "aws_kms_alias" "dynamodb_us_west_1" {
provider = aws.us_west_1
name_prefix = "alias/api/dynamodb"
target_key_id = aws_kms_key.dynamodb_us_west_1.key_id
}
resource "aws_kms_key" "dynamodb_us_west_2" {
provider = aws.us_west_2
description = "A key for the dynamodb tables for the API application"
enable_key_rotation = true
tags = merge(local.common_tags)
}
resource "aws_kms_alias" "dynamodb_us_west_2" {
provider = aws.us_west_2
name_prefix = "alias/api/dynamodb"
target_key_id = aws_kms_key.dynamodb_us_west_2.key_id
}