-
Notifications
You must be signed in to change notification settings - Fork 0
/
policies.tf
49 lines (42 loc) · 1.38 KB
/
policies.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
# The policy document that allows assumption of the email sending role
# in the DNS account.
data "aws_iam_policy_document" "email_sending" {
statement {
actions = [
"sts:AssumeRole",
"sts:TagSession",
]
resources = [
data.terraform_remote_state.dns.outputs.sessendemail_role.arn,
]
}
}
# The policy that allows assumption of the email sending role in the
# DNS account.
resource "aws_iam_policy" "email_sending" {
provider = aws.users
description = var.email_sending_policy_description
name = var.email_sending_policy_name
policy = data.aws_iam_policy_document.email_sending.json
}
# The policy document that allows assumption of the email suppression
# list management role in the DNS account.
data "aws_iam_policy_document" "suppression_list_management" {
statement {
actions = [
"sts:AssumeRole",
"sts:TagSession",
]
resources = [
data.terraform_remote_state.dns.outputs.sesmanagesuppressionlist_role.arn,
]
}
}
# The policy that allows assumption of the email suppression list
# management role in the DNS account.
resource "aws_iam_policy" "suppression_list_management" {
provider = aws.users
description = var.suppression_list_management_policy_description
name = var.suppression_list_management_policy_name
policy = data.aws_iam_policy_document.suppression_list_management.json
}