-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
aws_iam_policy_document.tf
113 lines (108 loc) · 3.62 KB
/
aws_iam_policy_document.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
data "aws_iam_policy_document" "assume_role_api_gateway" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = ["apigateway.amazonaws.com"]
type = "Service"
}
sid = "AnimalCrossingAssumeRoleApiGateway"
}
}
data "aws_iam_policy_document" "assume_role_lambda" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = ["lambda.amazonaws.com"]
type = "Service"
}
sid = "AnimalCrossingAssumeRoleLambda"
}
}
data "aws_iam_policy_document" "assume_role_step_function" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = ["states.amazonaws.com"]
type = "Service"
}
sid = "AnimalCrossingAssumeRoleStepFunction"
}
}
data "aws_iam_policy_document" "lambda_role" {
statement {
actions = [
"lambda:InvokeFunction"
]
effect = "Allow"
resources = [
aws_lambda_function.api_gateway_dynamodb_get_item.arn,
aws_lambda_function.api_gateway_dynamodb_scan.arn,
aws_lambda_function.state_machine_dynamodb_put_item.arn,
aws_lambda_function.state_machine_s3_put_object.arn
]
}
}
data "aws_iam_policy_document" "s3_full_access" {
statement {
actions = [
"s3:*"
]
effect = "Allow"
resources = [
"${aws_s3_bucket.s3.arn}",
"${aws_s3_bucket.s3.arn}/*"
]
}
}
data "aws_iam_policy_document" "step_functions_full_access" {
statement {
actions = [
"states:*"
]
effect = "Allow"
resources = [
aws_sfn_state_machine.achievement_POST.arn,
aws_sfn_state_machine.card_POST.arn,
aws_sfn_state_machine.clothing_accessory_POST.arn,
aws_sfn_state_machine.clothing_bag_POST.arn,
aws_sfn_state_machine.clothing_bottom_POST.arn,
aws_sfn_state_machine.clothing_dress_up_POST.arn,
aws_sfn_state_machine.clothing_headwear_POST.arn,
aws_sfn_state_machine.clothing_other_POST.arn,
aws_sfn_state_machine.clothing_shoe_POST.arn,
aws_sfn_state_machine.clothing_sock_POST.arn,
aws_sfn_state_machine.clothing_top_POST.arn,
aws_sfn_state_machine.clothing_umbrella_POST.arn,
aws_sfn_state_machine.construction_POST.arn,
aws_sfn_state_machine.creature_fish_POST.arn,
aws_sfn_state_machine.creature_insect_POST.arn,
aws_sfn_state_machine.creature_sea_POST.arn,
aws_sfn_state_machine.furniture_artwork_POST.arn,
aws_sfn_state_machine.furniture_ceiling_POST.arn,
aws_sfn_state_machine.furniture_fencing_POST.arn,
aws_sfn_state_machine.furniture_floor_POST.arn,
aws_sfn_state_machine.furniture_fossil_POST.arn,
aws_sfn_state_machine.furniture_gyroid_POST.arn,
aws_sfn_state_machine.furniture_housewear_POST.arn,
aws_sfn_state_machine.furniture_interior_structure_POST.arn,
aws_sfn_state_machine.furniture_miscellaneous_POST.arn,
aws_sfn_state_machine.furniture_music_POST.arn,
aws_sfn_state_machine.furniture_photo_POST.arn,
aws_sfn_state_machine.furniture_poster_POST.arn,
aws_sfn_state_machine.furniture_rug_POST.arn,
aws_sfn_state_machine.furniture_wall_mounted_POST.arn,
aws_sfn_state_machine.furniture_wallpaper_POST.arn,
aws_sfn_state_machine.item_POST.arn,
aws_sfn_state_machine.item_other_POST.arn,
aws_sfn_state_machine.paradise_planning_POST.arn,
aws_sfn_state_machine.reaction_POST.arn,
aws_sfn_state_machine.recipe_POST.arn,
aws_sfn_state_machine.occasion_POST.arn,
aws_sfn_state_machine.villager_POST.arn,
aws_sfn_state_machine.villager_special_POST.arn
]
}
}