Skip to content

Commit e8ff403

Browse files
feat: Add timeout for opensearch domain (#21)
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
1 parent f37c096 commit e8ff403

File tree

7 files changed

+31
-5
lines changed

7 files changed

+31
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.88.2
3+
rev: v1.92.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each
@@ -22,10 +22,9 @@ repos:
2222
- '--args=--only=terraform_required_providers'
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
25-
- '--args=--only=terraform_unused_required_providers'
2625
- id: terraform_validate
2726
- repo: https://github.com/pre-commit/pre-commit-hooks
28-
rev: v4.5.0
27+
rev: v4.6.0
2928
hooks:
3029
- id: check-merge-conflict
3130
- id: end-of-file-fixer

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ No modules.
223223
| <a name="input_security_group_use_name_prefix"></a> [security\_group\_use\_name\_prefix](#input\_security\_group\_use\_name\_prefix) | Determines whether the security group name (`security_group_name`) is used as a prefix | `bool` | `true` | no |
224224
| <a name="input_software_update_options"></a> [software\_update\_options](#input\_software\_update\_options) | Software update options for the domain | `any` | <pre>{<br> "auto_software_update_enabled": true<br>}</pre> | no |
225225
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
226+
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Create and delete timeout configurations for the domain | `map(string)` | `{}` | no |
226227
| <a name="input_vpc_endpoints"></a> [vpc\_endpoints](#input\_vpc\_endpoints) | Map of VPC endpoints to create for the domain | `any` | `{}` | no |
227228
| <a name="input_vpc_options"></a> [vpc\_options](#input\_vpc\_options) | Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)) | `any` | `{}` | no |
228229

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ resource "aws_opensearch_domain" "this" {
224224
}
225225
}
226226

227+
timeouts {
228+
create = try(var.timeouts.create, null)
229+
delete = try(var.timeouts.delete, null)
230+
}
231+
227232
tags = local.tags
228233
}
229234

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ variable "vpc_options" {
139139
default = {}
140140
}
141141

142+
variable "timeouts" {
143+
description = "Create and delete timeout configurations for the domain"
144+
type = map(string)
145+
default = {}
146+
}
147+
142148
################################################################################
143149
# Package Association(s)
144150
################################################################################

wrappers/collection/versions.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 5.54"
8+
}
9+
}
310
}

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module "wrapper" {
7272
auto_software_update_enabled = true
7373
})
7474
tags = try(each.value.tags, var.defaults.tags, {})
75+
timeouts = try(each.value.timeouts, var.defaults.timeouts, {})
7576
vpc_endpoints = try(each.value.vpc_endpoints, var.defaults.vpc_endpoints, {})
7677
vpc_options = try(each.value.vpc_options, var.defaults.vpc_options, {})
7778
}

wrappers/versions.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 5.54"
8+
}
9+
}
310
}

0 commit comments

Comments
 (0)