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" {
| 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\_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 |
| 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 |
......
......@@ -48,6 +48,8 @@ module "db_option_group" {
options = var.options
timeouts = var.option_group_timeouts
tags = var.tags
}
......
......@@ -13,6 +13,7 @@
| option\_group\_description | The description of the option group | string | `""` | no |
| options | A list of Options to apply | any | `[]` | 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
......
......@@ -32,6 +32,10 @@ resource "aws_db_option_group" "this" {
},
)
timeouts {
delete = lookup(var.timeouts, "delete", null)
}
lifecycle {
create_before_destroy = true
}
......
......@@ -36,9 +36,16 @@ variable "options" {
default = []
}
variable "timeouts" {
description = "Define maximum timeout for deletion of `aws_db_option_group` resource"
type = map(string)
default = {
delete = "15m"
}
}
variable "tags" {
description = "A mapping of tags to assign to the resource"
type = map(string)
default = {}
}
......@@ -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" {
description = "The database can't be deleted when this value is set to true."
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