Commit 42c17635 authored by Anton Babenko's avatar Anton Babenko Committed by GitHub

Added delete timeout for db_option_group (#186)

parent 1492acf2
...@@ -177,6 +177,7 @@ module "db" { ...@@ -177,6 +177,7 @@ module "db" {
| name | The DB name to create. If omitted, no database is created initially | string | `""` | no | | name | The DB name to create. If omitted, no database is created initially | string | `""` | no |
| option\_group\_description | The description of the option group | string | `""` | no | | option\_group\_description | The description of the option group | string | `""` | no |
| option\_group\_name | Name of the DB option group to associate | string | `""` | no | | option\_group\_name | Name of the DB option group to associate | string | `""` | no |
| option\_group\_timeouts | Define maximum timeout for deletion of `aws\_db\_option\_group` resource | map(string) | `{ "delete": "15m" }` | no |
| options | A list of Options to apply. | any | `[]` | no | | options | A list of Options to apply. | any | `[]` | no |
| parameter\_group\_description | Description of the DB parameter group to create | string | `""` | no | | parameter\_group\_description | Description of the DB parameter group to create | string | `""` | no |
| parameter\_group\_name | Name of the DB parameter group to associate or create | string | `""` | no | | parameter\_group\_name | Name of the DB parameter group to associate or create | string | `""` | no |
......
...@@ -48,6 +48,8 @@ module "db_option_group" { ...@@ -48,6 +48,8 @@ module "db_option_group" {
options = var.options options = var.options
timeouts = var.option_group_timeouts
tags = var.tags tags = var.tags
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
| option\_group\_description | The description of the option group | string | `""` | no | | option\_group\_description | The description of the option group | string | `""` | no |
| options | A list of Options to apply | any | `[]` | no | | options | A list of Options to apply | any | `[]` | no |
| tags | A mapping of tags to assign to the resource | map(string) | `{}` | no | | tags | A mapping of tags to assign to the resource | map(string) | `{}` | no |
| timeouts | Define maximum timeout for deletion of `aws\_db\_option\_group` resource | map(string) | `{ "delete": "15m" }` | no |
## Outputs ## Outputs
......
...@@ -32,6 +32,10 @@ resource "aws_db_option_group" "this" { ...@@ -32,6 +32,10 @@ resource "aws_db_option_group" "this" {
}, },
) )
timeouts {
delete = lookup(var.timeouts, "delete", null)
}
lifecycle { lifecycle {
create_before_destroy = true create_before_destroy = true
} }
......
...@@ -36,9 +36,16 @@ variable "options" { ...@@ -36,9 +36,16 @@ variable "options" {
default = [] default = []
} }
variable "timeouts" {
description = "Define maximum timeout for deletion of `aws_db_option_group` resource"
type = map(string)
default = {
delete = "15m"
}
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to the resource" description = "A mapping of tags to assign to the resource"
type = map(string) type = map(string)
default = {} default = {}
} }
...@@ -313,6 +313,14 @@ variable "timeouts" { ...@@ -313,6 +313,14 @@ variable "timeouts" {
} }
} }
variable "option_group_timeouts" {
description = "Define maximum timeout for deletion of `aws_db_option_group` resource"
type = map(string)
default = {
delete = "15m"
}
}
variable "deletion_protection" { variable "deletion_protection" {
description = "The database can't be deleted when this value is set to true." description = "The database can't be deleted when this value is set to true."
type = bool type = bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment