-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvariables.tf
101 lines (84 loc) · 2.94 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
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
# ================================== Required =====================================
variable "application_name" {
description = "This value is added to any log in Kibana as a tag for filtering"
type = string
}
variable "functionbeat_version" {
description = "Funtionbeat version to deploy"
type = string
validation {
condition = tonumber(split(".", var.functionbeat_version)[0]) >= 8 && tonumber(split(".", var.functionbeat_version)[1]) >= 12 && tonumber(split(".", var.functionbeat_version)[2]) >= 1
error_message = "The functionbeat_version must be at least '8.12.1' to be able to use the provided.al2 aws lambda runtime."
}
}
variable "lambda_config" {
description = "Minimal required configuration for Functionbeat lambda"
type = object({
name = string
vpc_config = object({
vpc_id = string
subnet_ids = list(string)
security_group_ids = list(string)
})
output_elasticsearch = optional(any)
output_logstash = optional(any)
})
}
# ================================= Extra Lambda ==================================
variable "lambda_reserved_concurrent_execution" {
description = "ReservedConcurrentExecutions for the Lambda"
type = number
default = 5
}
variable "lambda_memory_size" {
description = "Memory limit for the Lambda"
type = number
default = 128
}
variable "lambda_timeout" {
description = "Timeout for the Lambda"
type = number
default = 3
}
variable "lambda_description" {
description = "Description added to the Lambda"
type = string
default = "Lambda function to ship cloudwatch logs to Kibana"
}
variable "lambda_write_arn_to_ssm" {
description = "Will write the actual Functionbeat Lambda ARN to SSM"
type = bool
default = true
}
# ============================== Extra Functionbeat ===============================
variable "fb_extra_configuration" {
description = "All valid Functionbeat configuration passed as valid HCL object. For configuration options head over to Functionbeat documentation."
type = any
default = {}
}
variable "fb_extra_tags" {
description = "The tags of the shipper are included in their own field with each transaction published"
type = list(string)
default = []
}
variable "fb_log_level" {
description = "Loglevel for Lambda"
type = string
default = "info"
}
# ================================ Extra Terraform ================================
variable "loggroup_name" {
description = "Name of the Cloudwatch log group to be added as trigger for the function"
type = string
default = null
}
variable "loggroup_filter_pattern" {
description = "Filter on the Cloudwatch log group to trigger the function only in case of matches"
type = string
default = ""
}
variable "tags" {
description = "Tags to add to the actual AWS resources"
type = map(any)
default = {}
}