-
Notifications
You must be signed in to change notification settings - Fork 6
/
shared.tf
34 lines (31 loc) · 1.32 KB
/
shared.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
resource "random_string" "random_resource_name_suffix" {
length = 10
special = false
upper = false
}
module "api_gateway" {
source = "./modules/api_gateway"
global_tags = var.global_tags
tags = var.tags
environment = var.environment
integration_type = var.integration_type
resource_name_pattern = local.resource_name_pattern
function_name = local.api_triggered_function_name
lambda_function_arn = local.api_triggered_function_arn
}
module "secrets_manager" {
count = var.store_secret_in_secrets_manager ? 1 : 0
integration_type = var.integration_type
source = "./modules/secrets_manager"
secrets_names = local.default_secrets_names[var.integration_type]
}
module "lambda_role" {
source = "./modules/role"
role_name = "${local.resource_name_pattern}-role"
store_secret_in_secrets_manager = var.store_secret_in_secrets_manager
secrets_arns = var.store_secret_in_secrets_manager ? module.secrets_manager[0].secrets_arns : []
tags = var.tags
global_tags = var.global_tags
multiple_lambda_integration = local.multiple_lambda_integration
blacklist_object_arn = local.blacklist_file_arn
}