forked from rpstreef/tf-apigateway
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
136 lines (112 loc) · 3.85 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# -----------------------------------------------------------------------------
# Variables: General
# -----------------------------------------------------------------------------
variable "namespace" {
description = "AWS resource namespace/prefix"
}
variable "region" {
description = "AWS region"
type = string
default = "us-east-1"
}
variable "resource_tag_name" {
description = "Resource name for billing purposes"
}
# -----------------------------------------------------------------------------
# Variables: API Gateway
# -----------------------------------------------------------------------------
variable "api_name" {
description = "API Gateway endpoint name"
}
variable "api_template" {
description = "API Gateway OpenAPI 3 template file"
}
variable "api_template_vars" {
description = "Variables required in the OpenAPI template file"
type = map(string)
}
variable "api_domain_name" {
description = "Domain name of the API Gateway REST API for self-signed TLS certificate"
type = string
default = ""
}
variable "api_base_path" {
description = "The base path to use for custom domain mappings"
type = string
default = ""
}
variable "acm_certificate_arn" {
description = "The ARN of the ACM certificate to use for the custom domain name"
type = string
default = ""
}
variable "api_throttling_rate_limit" {
description = "API Gateway total requests across all API's within a REST endpoint"
}
variable "api_throttling_burst_limit" {
description = "API Gateway total concurrent connections allowed for all API's within a REST endpoint"
}
variable "api_metrics_enabled" {
description = "Enables detailed API Gateway metrics"
type = bool
default = false
}
variable "api_logging_level" {
description = " (Optional) Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The available levels are OFF, ERROR, and INFO."
type = string
default = "OFF"
}
variable "api_data_trace_enabled" {
description = "(Optional) Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs."
type = bool
default = false
}
variable "xray_tracing_enabled" {
description = "Enables the XRay tracing and will create the necessary IAM permissions "
type = bool
default = false
}
# -----------------------------------------------------------------------------
# Variables: Cloudwatch Alarms Latency
# -----------------------------------------------------------------------------
variable "resources" {
description = "Methods that have Cloudwatch alarms enabled"
type = map(string)
}
variable "latency_threshold_p95" {
description = "The value against which the specified statistic is compared"
default = 1000
}
variable "latency_threshold_p99" {
description = "The value against which the specified statistic is compared"
default = 1000
}
variable "create_latency_alarm" {
description = "Enable/disable latency alerts"
type = bool
default = true
}
variable "latency_evaluationPeriods" {
description = "The number of periods over which data is compared to the specified threshold"
default = 5
}
variable "fourRate_threshold" {
description = "Percentage of errors that will trigger an alert"
default = 0.02
type = number
}
variable "fourRate_evaluationPeriods" {
description = "How many periods are evaluated before the alarm is triggered"
default = 5
type = number
}
variable "fiveRate_threshold" {
description = "Percentage of errors that will trigger an alert"
default = 0.02
type = number
}
variable "fiveRate_evaluationPeriods" {
description = "How many periods are evaluated before the alarm is triggered"
default = 5
type = number
}