Skip to content

Commit 5a5d540

Browse files
sunkaraamruthaAmruthacloudpossebotaknysh
authored
Adding timeouts while updating,deleting or creating proxy (#9)
* adding timeouts for when proxy is created * Auto Format * ci(Mergify): configuration update Signed-off-by: null <amrutha_sunkara-wm@discovery.com> * Update variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Update variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Update examples/complete/variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Update examples/complete/variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Update examples/complete/variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Update variables.tf Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com> * Auto Format * Update main.tf * Auto Format * Update main.tf * Auto Format Signed-off-by: null <amrutha_sunkara-wm@discovery.com> Co-authored-by: Amrutha <amrutha.sunkara@warnermedia.com> Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com>
1 parent ac5f706 commit 5a5d540

File tree

7 files changed

+52
-2
lines changed

7 files changed

+52
-2
lines changed

.github/auto-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ version-resolver:
1717
- 'bugfix'
1818
- 'bug'
1919
- 'hotfix'
20-
- 'no-release'
2120
default: 'minor'
2221

2322
categories:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ Available targets:
300300
| <a name="input_max_idle_connections_percent"></a> [max\_idle\_connections\_percent](#input\_max\_idle\_connections\_percent) | Controls how actively the proxy closes idle database connections in the connection pool. A high value enables the proxy to leave a high percentage of idle connections open. A low value causes the proxy to close idle client connections and return the underlying database connections to the connection pool | `number` | `50` | no |
301301
| <a name="input_name"></a> [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.<br>This is the only ID element not also included as a `tag`.<br>The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
302302
| <a name="input_namespace"></a> [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
303+
| <a name="input_proxy_create_timeout"></a> [proxy\_create\_timeout](#input\_proxy\_create\_timeout) | Proxy creation timeout | `string` | `"30m"` | no |
304+
| <a name="input_proxy_delete_timeout"></a> [proxy\_delete\_timeout](#input\_proxy\_delete\_timeout) | Proxy delete timeout | `string` | `"60m"` | no |
305+
| <a name="input_proxy_update_timeout"></a> [proxy\_update\_timeout](#input\_proxy\_update\_timeout) | Proxy update timeout | `string` | `"30m"` | no |
303306
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
304307
| <a name="input_require_tls"></a> [require\_tls](#input\_require\_tls) | A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy | `bool` | `false` | no |
305308
| <a name="input_session_pinning_filters"></a> [session\_pinning\_filters](#input\_session\_pinning\_filters) | Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection | `list(string)` | `null` | no |
@@ -490,7 +493,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
490493

491494
[![README Footer][readme_footer_img]][readme_footer_link]
492495
[![Beacon][beacon]][website]
493-
496+
<!-- markdownlint-disable -->
494497
[logo]: https://cloudposse.com/logo-300x69.svg
495498
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds-db-proxy&utm_content=docs
496499
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds-db-proxy&utm_content=website
@@ -521,3 +524,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
521524
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-rds-db-proxy
522525
[share_email]: mailto:?subject=terraform-aws-rds-db-proxy&body=https://github.com/cloudposse/terraform-aws-rds-db-proxy
523526
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-rds-db-proxy?pixel&cs=github&cm=readme&an=terraform-aws-rds-db-proxy
527+
<!-- markdownlint-restore -->

docs/terraform.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
| <a name="input_max_idle_connections_percent"></a> [max\_idle\_connections\_percent](#input\_max\_idle\_connections\_percent) | Controls how actively the proxy closes idle database connections in the connection pool. A high value enables the proxy to leave a high percentage of idle connections open. A low value causes the proxy to close idle client connections and return the underlying database connections to the connection pool | `number` | `50` | no |
6666
| <a name="input_name"></a> [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.<br>This is the only ID element not also included as a `tag`.<br>The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
6767
| <a name="input_namespace"></a> [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
68+
| <a name="input_proxy_create_timeout"></a> [proxy\_create\_timeout](#input\_proxy\_create\_timeout) | Proxy creation timeout | `string` | `"30m"` | no |
69+
| <a name="input_proxy_delete_timeout"></a> [proxy\_delete\_timeout](#input\_proxy\_delete\_timeout) | Proxy delete timeout | `string` | `"60m"` | no |
70+
| <a name="input_proxy_update_timeout"></a> [proxy\_update\_timeout](#input\_proxy\_update\_timeout) | Proxy update timeout | `string` | `"30m"` | no |
6871
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
6972
| <a name="input_require_tls"></a> [require\_tls](#input\_require\_tls) | A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy | `bool` | `false` | no |
7073
| <a name="input_session_pinning_filters"></a> [session\_pinning\_filters](#input\_session\_pinning\_filters) | Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection | `list(string)` | `null` | no |

examples/complete/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,9 @@ module "rds_proxy" {
8787
session_pinning_filters = var.session_pinning_filters
8888
existing_iam_role_arn = var.existing_iam_role_arn
8989

90+
proxy_create_timeout = var.proxy_create_timeout
91+
proxy_update_timeout = var.proxy_update_timeout
92+
proxy_delete_timeout = var.proxy_delete_timeout
93+
9094
context = module.this.context
9195
}

examples/complete/variables.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,20 @@ variable "existing_iam_role_arn" {
155155
default = null
156156
description = "The ARN of an existing IAM role that the proxy can use to access secrets in AWS Secrets Manager. If not provided, the module will create a role to access secrets in Secrets Manager"
157157
}
158+
159+
variable "proxy_create_timeout" {
160+
type = string
161+
default = "30m"
162+
description = "Proxy create timeout"
163+
}
164+
165+
variable "proxy_update_timeout" {
166+
type = string
167+
default = "30m"
168+
description = "Proxy update timeout"
169+
}
170+
variable "proxy_delete_timeout" {
171+
type = string
172+
default = "60m"
173+
description = "Proxy delete timeout"
174+
}

main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ resource "aws_db_proxy" "this" {
2626
}
2727

2828
tags = module.this.tags
29+
30+
timeouts {
31+
create = var.proxy_create_timeout
32+
update = var.proxy_update_timeout
33+
delete = var.proxy_delete_timeout
34+
}
2935
}
3036

3137
resource "aws_db_proxy_default_target_group" "this" {

variables.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,20 @@ variable "kms_key_id" {
101101
default = null
102102
description = "The ARN or Id of the AWS KMS customer master key (CMK) to encrypt the secret values in the versions stored in secrets. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`)"
103103
}
104+
105+
variable "proxy_create_timeout" {
106+
type = string
107+
default = "30m"
108+
description = "Proxy creation timeout"
109+
}
110+
111+
variable "proxy_update_timeout" {
112+
type = string
113+
default = "30m"
114+
description = "Proxy update timeout"
115+
}
116+
variable "proxy_delete_timeout" {
117+
type = string
118+
default = "60m"
119+
description = "Proxy delete timeout"
120+
}

0 commit comments

Comments
 (0)