-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasset.tf
More file actions
35 lines (29 loc) · 870 Bytes
/
asset.tf
File metadata and controls
35 lines (29 loc) · 870 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
resource "aws_iam_role" "execution" {
provider = aws.asset
name = "AWSCloudFormationStackSetExecutionRole"
assume_role_policy = data.aws_iam_policy_document.execution_trust.json
}
data "aws_iam_policy_document" "execution_trust" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = [aws_iam_role.admin.arn]
type = "AWS"
}
}
}
# Specifies the set of permissions required for the deployment of the Cloudfomation stack
data "aws_iam_policy_document" "execution_deployment" {
statement {
actions = ["*"]
effect = "Allow"
resources = ["*"]
}
}
resource "aws_iam_role_policy" "execution_deployment" {
provider = aws.asset
name = "Deployment"
policy = data.aws_iam_policy_document.execution_deployment.json
role = aws_iam_role.execution.name
}