-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New resource: aws_db_instance_automated_backups_replication
#23759
New resource: aws_db_instance_automated_backups_replication
#23759
Conversation
…ion' is set through either env var or provider. And give a default value for `retention_period`
@ewbankkit wanted to get some of your input here, the API is a bit poorly designed in my opinion. It's expected that this call is done from within the destination region (if you want to replicate backups from us-east-1 to us-west-2, I would have to declare the resource in us-west-2, pointing to a source_db_instance_arn in us-east-1). This conflicts a little bit with having to wait for the instance becoming 'available' after modifying.. At the moment I have this, which works fine but I still don't find it pretty that it has to be declared in the destination region. resource "aws_db_instance_backup_replication" "default" {
source_db_instance_arn = "arn:aws:rds:us-east-1:832224938332:db:database-1"
kms_key_id = "arn:aws:kms:us-west-2:832224938332:key/example-key-id"
}
provider "aws" {
region = "us-west-2"
} |
@bschaatsbergen We've run into this sort of thing in a few places. A recent one that I worked on is here: terraform-provider-aws/internal/service/rds/global_cluster.go Lines 580 to 588 in 928c293
If it needs to wait on something in another region, my opinion is that it should wait the same, as though it were in the same region. |
Thank you Yak! :) |
…tedBackupByID' -> 'FindDBInstanceAutomatedBackupByARN'.
…tomatedBackupByARN'.
…waiting for deletion. Acceptance test output: % make testacc TESTS=TestAccRDSInstanceAutomatedBackupReplication_basic PKG=rds ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSInstanceAutomatedBackupReplication_basic' -timeout 180m === RUN TestAccRDSInstanceAutomatedBackupReplication_basic === PAUSE TestAccRDSInstanceAutomatedBackupReplication_basic === CONT TestAccRDSInstanceAutomatedBackupReplication_basic --- PASS: TestAccRDSInstanceAutomatedBackupReplication_basic (1340.32s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 1345.529s
Had a rough weekend, looks like I missed a few things yesterday. Thanks for the extra pair of eyes @ewbankkit . |
@bschaatsbergen In general everything was great. Do you know anything about the
but the I see no harm in adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccRDSInstanceAutomatedBackupReplication_ PKG=rds ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 2 -run='TestAccRDSInstanceAutomatedBackupReplication_' -timeout 180m
=== RUN TestAccRDSInstanceAutomatedBackupReplication_basic
=== PAUSE TestAccRDSInstanceAutomatedBackupReplication_basic
=== RUN TestAccRDSInstanceAutomatedBackupReplication_retentionPeriod
=== PAUSE TestAccRDSInstanceAutomatedBackupReplication_retentionPeriod
=== RUN TestAccRDSInstanceAutomatedBackupReplication_kmsEncrypted
=== PAUSE TestAccRDSInstanceAutomatedBackupReplication_kmsEncrypted
=== CONT TestAccRDSInstanceAutomatedBackupReplication_basic
=== CONT TestAccRDSInstanceAutomatedBackupReplication_kmsEncrypted
--- PASS: TestAccRDSInstanceAutomatedBackupReplication_basic (1439.87s)
=== CONT TestAccRDSInstanceAutomatedBackupReplication_retentionPeriod
--- PASS: TestAccRDSInstanceAutomatedBackupReplication_kmsEncrypted (1479.54s)
--- PASS: TestAccRDSInstanceAutomatedBackupReplication_retentionPeriod (1405.06s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 2854.272s
@ewbankkit Clear, regarding the
At first I was under the impression that this was handled internally if not specified. After taking a look at Event History in CloudTrail I didn't see any PreSignedUrl (explicitly setting it through the CLI it does show in the event) going over the wire even if the automated backup was encrypted. If we want to avoid adding |
…tomated_backups_replication'; Rename files.
…tomated_backups_replication'; Rename functions.
aws_db_instance_backups_replication
OK, another change 😄. Renamed the resource to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccRDSInstanceAutomatedBackupsReplication_ PKG=rds ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 2 -run='TestAccRDSInstanceAutomatedBackupsReplication_' -timeout 180m
=== RUN TestAccRDSInstanceAutomatedBackupsReplication_basic
=== PAUSE TestAccRDSInstanceAutomatedBackupsReplication_basic
=== RUN TestAccRDSInstanceAutomatedBackupsReplication_retentionPeriod
=== PAUSE TestAccRDSInstanceAutomatedBackupsReplication_retentionPeriod
=== RUN TestAccRDSInstanceAutomatedBackupsReplication_kmsEncrypted
=== PAUSE TestAccRDSInstanceAutomatedBackupsReplication_kmsEncrypted
=== CONT TestAccRDSInstanceAutomatedBackupsReplication_basic
=== CONT TestAccRDSInstanceAutomatedBackupsReplication_kmsEncrypted
--- PASS: TestAccRDSInstanceAutomatedBackupsReplication_basic (1188.64s)
=== CONT TestAccRDSInstanceAutomatedBackupsReplication_retentionPeriod
--- PASS: TestAccRDSInstanceAutomatedBackupsReplication_kmsEncrypted (1249.54s)
--- PASS: TestAccRDSInstanceAutomatedBackupsReplication_retentionPeriod (1047.58s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 2240.134s
aws_db_instance_backups_replication
aws_db_instance_automated_backups_replication
aws_db_instance_automated_backups_replication
aws_db_instance_automated_backups_replication
This functionality has been released in v4.9.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #23673.
Closes #16708.
Similar #20448.
Output from acceptance testing: