Skip to content

Commit b922919

Browse files
authored
feat: Add throttling variables (#58)
* feat: Add throttling variables * docs: Update the README.md
1 parent 0406190 commit b922919

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ Available targets:
164164
| <a name="input_stage_name"></a> [stage\_name](#input\_stage\_name) | The name of the stage | `string` | `""` | no |
165165
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br/>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
166166
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
167+
| <a name="input_throttling_burst_limit"></a> [throttling\_burst\_limit](#input\_throttling\_burst\_limit) | The API request burst limit | `number` | `-1` | no |
168+
| <a name="input_throttling_rate_limit"></a> [throttling\_rate\_limit](#input\_throttling\_rate\_limit) | The API request rate limit | `number` | `-1` | no |
167169
| <a name="input_vpc_endpoints"></a> [vpc\_endpoints](#input\_vpc\_endpoints) | List of VPC Endpoint IDs to attach to the API Gateway | `list(string)` | `null` | no |
168170
| <a name="input_xray_tracing_enabled"></a> [xray\_tracing\_enabled](#input\_xray\_tracing\_enabled) | A flag to indicate whether to enable X-Ray tracing. | `bool` | `false` | no |
169171

docs/terraform.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
| <a name="input_stage_name"></a> [stage\_name](#input\_stage\_name) | The name of the stage | `string` | `""` | no |
6464
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br/>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
6565
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
66+
| <a name="input_throttling_burst_limit"></a> [throttling\_burst\_limit](#input\_throttling\_burst\_limit) | The API request burst limit | `number` | `-1` | no |
67+
| <a name="input_throttling_rate_limit"></a> [throttling\_rate\_limit](#input\_throttling\_rate\_limit) | The API request rate limit | `number` | `-1` | no |
6668
| <a name="input_vpc_endpoints"></a> [vpc\_endpoints](#input\_vpc\_endpoints) | List of VPC Endpoint IDs to attach to the API Gateway | `list(string)` | `null` | no |
6769
| <a name="input_xray_tracing_enabled"></a> [xray\_tracing\_enabled](#input\_xray\_tracing\_enabled) | A flag to indicate whether to enable X-Ray tracing. | `bool` | `false` | no |
6870

main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ resource "aws_api_gateway_method_settings" "all" {
8181
method_path = "*/*"
8282

8383
settings {
84-
metrics_enabled = var.metrics_enabled
85-
logging_level = var.logging_level
86-
data_trace_enabled = var.data_trace_enabled
84+
metrics_enabled = var.metrics_enabled
85+
logging_level = var.logging_level
86+
data_trace_enabled = var.data_trace_enabled
87+
throttling_rate_limit = var.throttling_rate_limit
88+
throttling_burst_limit = var.throttling_burst_limit
8789
}
8890
}
8991

variables.tf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,16 @@ variable "stage_name" {
138138
type = string
139139
default = ""
140140
description = "The name of the stage"
141-
}
141+
}
142+
143+
variable "throttling_burst_limit" {
144+
description = "The API request burst limit"
145+
type = number
146+
default = -1
147+
}
148+
149+
variable "throttling_rate_limit" {
150+
description = "The API request rate limit"
151+
type = number
152+
default = -1
153+
}

0 commit comments

Comments
 (0)