Skip to content

Commit 08dced9

Browse files
authored
feat: Support serverlessv2_scaling_configuration.seconds_until_auto_pause (#477)
* seconds_until_auto_pause * revert
1 parent e6b5d79 commit 08dced9

File tree

18 files changed

+32
-30
lines changed

18 files changed

+32
-30
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ Terraform documentation is generated automatically using [pre-commit hooks](http
224224
| Name | Version |
225225
|------|---------|
226226
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
227-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
227+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
228228

229229
## Providers
230230

231231
| Name | Version |
232232
|------|---------|
233-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
233+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
234234

235235
## Modules
236236

examples/autoscaling/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
3030

3131
## Modules
3232

examples/autoscaling/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/global-cluster/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.2 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
31-
| <a name="provider_aws.secondary"></a> [aws.secondary](#provider\_aws.secondary) | >= 5.64 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
31+
| <a name="provider_aws.secondary"></a> [aws.secondary](#provider\_aws.secondary) | >= 5.81 |
3232
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.2 |
3333

3434
## Modules

examples/global-cluster/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99

1010
random = {

examples/multi-az/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
3030

3131
## Modules
3232

examples/multi-az/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/mysql/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
3030

3131
## Modules
3232

examples/mysql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/postgresql/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
3030

3131
## Modules
3232

examples/postgresql/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/s3-import/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ Note that this example may create resources which cost money. Run `terraform des
4949
| Name | Version |
5050
|------|---------|
5151
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
52-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
52+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
5353

5454
## Providers
5555

5656
| Name | Version |
5757
|------|---------|
58-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
58+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
5959

6060
## Modules
6161

examples/s3-import/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/serverless/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.5 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.5 |
3232

3333
## Modules

examples/serverless/main.tf

+4-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module "aurora_mysql_v2" {
153153

154154
data "aws_rds_engine_version" "postgresql" {
155155
engine = "aurora-postgresql"
156-
version = "14.8"
156+
version = "14.12"
157157
}
158158

159159
module "aurora_postgresql_v2" {
@@ -182,8 +182,9 @@ module "aurora_postgresql_v2" {
182182
enable_http_endpoint = true
183183

184184
serverlessv2_scaling_configuration = {
185-
min_capacity = 2
186-
max_capacity = 10
185+
min_capacity = 0
186+
max_capacity = 10
187+
seconds_until_auto_pause = 3600
187188
}
188189

189190
instance_class = "db.serverless"

examples/serverless/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
random = {
1010
source = "hashicorp/random"

main.tf

+3-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ resource "aws_rds_cluster" "this" {
127127
for_each = length(var.serverlessv2_scaling_configuration) > 0 && var.engine_mode == "provisioned" ? [var.serverlessv2_scaling_configuration] : []
128128

129129
content {
130-
max_capacity = serverlessv2_scaling_configuration.value.max_capacity
131-
min_capacity = serverlessv2_scaling_configuration.value.min_capacity
130+
max_capacity = serverlessv2_scaling_configuration.value.max_capacity
131+
min_capacity = serverlessv2_scaling_configuration.value.min_capacity
132+
seconds_until_auto_pause = try(serverlessv2_scaling_configuration.value.seconds_until_auto_pause, null)
132133
}
133134
}
134135

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.64"
7+
version = ">= 5.81"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)