-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
69 lines (60 loc) · 1.44 KB
/
variables.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
#
# Account
#
locals {
# just name this value by yourself
service_name = "workshop"
}
#
# Variables for determining resource needs for each environment
# - common : for commonly used resources
# - system : for those resources which outside the service
# - service : for production service resources
locals {
env = terraform.workspace
on_common = local.env == "common" ? true : false
on_system = local.env == "system" ? true : false
on_service = local.env != "common" && local.env != "system" ? true : false
}
#
# Lambda
#
locals {
lambda_bucket = format("%s-%s", "drecom-terraform", local.service_name)
lambda_path = local.service_name
lambda_key = "${local.lambda_path}/lambda.zip"
lambda_main_key = "${local.lambda_path}/lambda-main.zip"
lambda_lib_key = "${local.lambda_path}/lambda-lib.zip"
lambda_runtime = "python3.6"
lambda_function_name = "hello"
}
locals {
lambda_log_group_prefix = "/aws/lambda/"
}
#
# Api gateway
#
locals {
api_gateway_rest_api_name = "hello"
api_gateway_deploy_stage_name = "example"
}
#
# App runner
#
locals {
apprunner_service_name = format("%s-%s", "sample-app", local.service_name)
apprunner_service_port = "3000"
ecr_repo_tag = "release"
}
variable "aws_access_key" {
type = string
}
variable "aws_secret_key" {
type = string
}
variable "service_account_id" {
type = string
}
variable "region" {
type = string
}