-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
61 lines (60 loc) · 1.85 KB
/
main.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
module "lambda_function-create" {
source = "terraform-aws-modules/lambda/aws"
function_name = "myways-create"
description = "Function for creating dynamodb item"
handler = "create.lambda_handler"
runtime = "python3.8"
source_path = "lambda/create.py"
attach_policies = true
create_current_version_allowed_triggers = false
policies = [
"arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess",
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
]
number_of_policies = 1
tags = {
Name = "create"
}
}
module "lambda_function-search" {
source = "terraform-aws-modules/lambda/aws"
function_name = "myways-search"
description = "Function for searching"
handler = "search.lambda_handler"
runtime = "python3.8"
source_path = "lambda/search.py"
attach_policies = true
create_current_version_allowed_triggers = false
policies = [
"arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess",
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
]
number_of_policies = 1
tags = {
Name = "search"
}
}
module "lambda_function-delete" {
source = "terraform-aws-modules/lambda/aws"
function_name = "myways-delete"
description = "Function for deleting dynamodb item"
handler = "delete.lambda_handler"
runtime = "python3.8"
source_path = "lambda/delete.py"
attach_policies = true
create_current_version_allowed_triggers = false
policies = [
"arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess",
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
]
number_of_policies = 1
tags = {
Name = "delete"
}
}
module "dynamodb" {
source = "./modules/dynamodb"
}
module "ec2" {
source = "./modules/ec2"
}