-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupport.tf
More file actions
executable file
·42 lines (38 loc) · 1.18 KB
/
support.tf
File metadata and controls
executable file
·42 lines (38 loc) · 1.18 KB
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
data "aws_iam_policy_document" "support" {
statement {
effect = "Allow"
actions = ["sts:AssumeRole"]
principals {
identifiers = ["arn:aws:iam::302232432727:root"] # Aspect account with IAM users for DPE support access
type = "AWS"
}
condition {
test = "BoolIfExists"
variable = "aws:MultiFactorAuthPresent" # Require MFA for Aspect DPE support access
values = ["true"]
}
}
}
data "aws_iam_policy_document" "operator" {
statement {
effect = "Allow"
actions = ["sts:AssumeRole"]
principals {
identifiers = ["arn:aws:iam::302232432727:root"] # Aspect account with IAM users for DPE operator access
type = "AWS"
}
condition {
test = "BoolIfExists"
variable = "aws:MultiFactorAuthPresent" # Require MFA for Aspect DPE operator access
values = ["true"]
}
}
}
resource "aws_iam_role" "support" {
name = "AspectWorkflowsSupport"
assume_role_policy = data.aws_iam_policy_document.support.json
}
resource "aws_iam_role" "operator" {
name = "AspectWorkflowsOperator"
assume_role_policy = data.aws_iam_policy_document.operator.json
}