Skip to content

Commit c9298e9

Browse files
Add variables to set cache ttl, rate and burst limit
1 parent 44f3207 commit c9298e9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

main.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ resource "aws_api_gateway_method_settings" "v1" {
260260
settings {
261261
metrics_enabled = false
262262
logging_level = "INFO"
263-
cache_ttl_in_seconds = 300
264-
throttling_burst_limit = 300
265-
throttling_rate_limit = 100
263+
cache_ttl_in_seconds = "${var.cache_ttl}"
264+
throttling_burst_limit = "${var.burst_limit}"
265+
throttling_rate_limit = "${var.rate_limit}"
266266
}
267267
}
268268

variables.tf

+15
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,18 @@ variable "zone_id" {
241241
type = "string"
242242
description = "Route 53 zone id"
243243
}
244+
245+
variable "rate_limit" {
246+
type = "string"
247+
description = "API Gateway rate limit"
248+
}
249+
250+
variable "burst_limit" {
251+
type = "string"
252+
description = "API Gateway burst limit"
253+
}
254+
255+
variable "cache_ttl" {
256+
type = "string"
257+
description = "API Gateway cache ttl"
258+
}

0 commit comments

Comments
 (0)