-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
70 lines (58 loc) · 1.97 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
70
variable "common_tags" {
type = map(string)
description = "Implements the common tags."
}
variable "config_file_name" {
type = string
description = "The name of the file var.plaintext_params will be written to as json."
default = "config.json"
}
variable "description" {
description = "Description of what the Lambda@Edge Function is cooking."
}
variable "environment" {
description = "Environment in which the function is going to run."
}
variable "file_globs" {
type = list(string)
description = "list of files or globs that you want included from the lambda_code_source_dir"
default = ["index.js", "node_modules/**", "yarn.lock", "package.json"]
}
variable "function_name" {
type = string
description = "Name of the Lambda@Edge Function."
}
variable "lambda_code_source_dir" {
type = string
description = "An absolute path to the directory containing the code to upload to lambda"
}
variable "lambda_handler" {
type = string
description = "The path to the main method that should handle the incoming requests."
default = "index.handler"
}
variable "lambda_runtime" {
type = string
description = "The runtime of the lambda function."
default = "nodejs10.x"
}
variable "plaintext_params" {
type = map(string)
default = {}
description = <<EOF
Lambda@Edge does not support env vars, so it is a common pattern to exchange Env vars for values read from a config file.
So instead of using env vars like:
`const someEnvValue = process.env.SOME_ENV`
you would have lookups from a config file:
```
const config = JSON.parse(readFileSync('./config.json'))
const someConfigValue = config.SomeKey
```
Compared to var.ssm_params, you should use this variable when you have non-secret things that you want very quick access
to during the execution of your lambda function.
EOF
}
variable "s3_artifact_bucket_name" {
type = string
description = "Name of the S3 bucket to upload versioned artifacts to."
}