Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom timeout block to aws_db_instance_automated_backups_replication #25796

3 changes: 3 additions & 0 deletions .changelog/25796.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_db_instance_automated_backups_replication: Add support for custom timeouts (create and delete)
```
11 changes: 11 additions & 0 deletions internal/service/rds/instance_automated_backups_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package rds
import (
"fmt"
"log"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
Expand All @@ -13,12 +14,22 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/verify"
)

const (
InstanceAutomatedBackupsReplicationCreateTimeout = 75 * time.Minute
InstanceAutomatedBackupsReplicationDeleteTimeout = 75 * time.Minute
)

func ResourceInstanceAutomatedBackupsReplication() *schema.Resource {
return &schema.Resource{
Create: resourceInstanceAutomatedBackupsReplicationCreate,
Read: resourceInstanceAutomatedBackupsReplicationRead,
Delete: resourceInstanceAutomatedBackupsReplicationDelete,

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(InstanceAutomatedBackupsReplicationCreateTimeout),
Delete: schema.DefaultTimeout(InstanceAutomatedBackupsReplicationDeleteTimeout),
},

Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The Amazon Resource Name (ARN) of the replicated automated backups.

## Timeouts

`aws_db_instance_automated_backups_replication` provides the following [Timeouts](https://www.terraform.io/docs/configuration/blocks/resources/syntax.html#operation-timeouts)
configuration options:

- `create` - (Default `75m`) How long to wait before RDS successfully starts replication of automated backups to a different AWS Region.
- `update` - (Default `75m`) How long to wait before RDS completes updating existing replication of automated backups to a different AWS Region.
bschaatsbergen marked this conversation as resolved.
Show resolved Hide resolved

## Import

RDS instance automated backups replication can be imported using the `arn`, e.g.,
Expand Down