-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
60 lines (59 loc) · 1.51 KB
/
data.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
data "aws_s3_bucket" "codepipeline_bucket" {
bucket = var.s3_bucket
}
data "aws_iam_policy_document" "codedeploy_role_policy" {
statement {
actions = [
"ecs:DescribeServices",
"ecs:CreateTaskSet",
"ecs:UpdateServicePrimaryTaskSet",
"ecs:DeleteTaskSet",
]
resources = [data.ecs]
}
statement {
actions = ["cloudwatch:DescribeAlarms"]
resources = ["*"]
}
statement {
actions = ["sns:Publish"]
resources = ["arn:aws:sns:*:*:CodeDeployTopic_*"]
}
statement {
actions = [
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:ModifyListener",
"elasticloadbalancing:DescribeRules",
"elasticloadbalancing:ModifyRule"
]
resources = [var.alb_listener_arn,var.alb_test_listener_arn]
}
statement {
actions = ["lambda:InvokeFunction"]
resources = ["arn:aws:lambda:*:*:function:CodeDeployHook_*"]
}
statement {
actions = [
"s3:GetObject",
"s3:GetObjectVersion",
"s3:GetBucketVersioning",
"s3:PutObjectAcl",
"s3:PutObject"
]
resources = [
"${data.aws_s3_bucket.codepipeline_bucket.arn}",
"${data.aws_s3_bucket.codepipeline_bucket.arn}/*"
]
}
#statement {
# actions = ["iam:PassRole"]
# resources = var.ecs_iam_roles_arns
#}
#statement {
# actions = [
# "codedeploy:*"
# ]
# resources = ["*"]
#}
}