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 shared_accounts parameter to db_snapshot_copy #34843

Merged
merged 32 commits into from
Jul 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a081a27
Add shared_accounts parameter to db_snapshot_copy
OpenGLShaders Dec 9, 2023
d72a082
formatting
OpenGLShaders Dec 10, 2023
624fb61
make it compile
OpenGLShaders Dec 10, 2023
0dac5ca
adding tests
OpenGLShaders Dec 10, 2023
c3e09ef
Merge branch 'main' into HEAD
ewbankkit Jul 23, 2024
540935a
Run 'make fix-constants PKG=rds'.
ewbankkit Jul 23, 2024
bfb2c0f
Correct CHANGELOG entry.
ewbankkit Jul 23, 2024
550b6a5
Cosmetics.
ewbankkit Jul 23, 2024
369eb17
Acceptance test output:
ewbankkit Jul 23, 2024
2bd3fd3
Add 'tfslices.PredicateValue'.
ewbankkit Jul 23, 2024
e386006
r/aws_db_snapshot: Migrate to AWS SDK for Go v2.
ewbankkit Jul 23, 2024
b0c847e
d/aws_db_snapshot: Migrate to AWS SDK for Go v2.
ewbankkit Jul 23, 2024
6451df9
r/aws_db_snapshot_copy: Migrate to AWS SDK for Go v2.
ewbankkit Jul 23, 2024
f061e67
Acceptance test output:
ewbankkit Jul 24, 2024
4c72379
Add 'TestAccRDSSnapshotCopy_destinationRegion'.
ewbankkit Jul 24, 2024
09e90c5
Acceptance test output:
ewbankkit Jul 24, 2024
917a7e9
r/aws_db_snapshot: Add '% progress' to 'waitDBSnapshotCreated'.
ewbankkit Jul 24, 2024
d5a480c
r/aws_db_snapshot_copy: Migrate 'destination_region' functionality to…
ewbankkit Jul 24, 2024
86dd6f8
d/aws_rds_reserved_instance_offering: Migrate to AWS SDK for Go v2.
ewbankkit Jul 24, 2024
4a62b96
r/aws_db_parameter_group: Migrate to AWS SDK for Go v2.
ewbankkit Jul 25, 2024
24a397b
Fix 'TestAccRDSParameterGroup_caseParameters'.
ewbankkit Jul 25, 2024
18f2da3
r/aws_rds_cluster_parameter_group: Migrate to AWS SDK for Go v2.
ewbankkit Jul 25, 2024
6826612
rds: Move flatteners and expanders around.
ewbankkit Jul 25, 2024
9606c59
r/aws_rds_cluster_endpoint: Migrate to AWS SDK for Go v2.
ewbankkit Jul 25, 2024
95815c3
r/aws_rds_cluster_endpoint: Fix acceptance tests.
ewbankkit Jul 25, 2024
ee1b5ad
r/aws_rds_cluster_role_association: Migrate to AWS SDK for Go v2.
ewbankkit Jul 25, 2024
8df8631
Fix semgrep 'ci.semgrep.pluginsdk.append-Read-to-diags'.
ewbankkit Jul 25, 2024
07d29de
Fix golangci-lint 'whitespace'.
ewbankkit Jul 25, 2024
008a0f1
Fix golangci-lint 'unparam'.
ewbankkit Jul 25, 2024
0ab5629
Merge branch 'main' into HEAD
ewbankkit Jul 25, 2024
336d2c0
Fix terrafmt error.
ewbankkit Jul 25, 2024
446ff1b
rds: Skip 'no matching RDS Reserved Instance Offering found' acceptan…
ewbankkit Jul 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
r/aws_db_snapshot_copy: Migrate 'destination_region' functionality to…
… AWS SDK for Go v2.
ewbankkit committed Jul 24, 2024

Verified

This commit was signed with the committer’s verified signature.
ewbankkit Kit Ewbank
commit d5a480cc71d8664ced5261993d037bcbc22fea42
17 changes: 12 additions & 5 deletions internal/service/rds/snapshot_copy.go
Original file line number Diff line number Diff line change
@@ -169,11 +169,6 @@ func resourceSnapshotCopyCreate(ctx context.Context, d *schema.ResourceData, met
input.CopyTags = aws.Bool(v.(bool))
}

// TODO
// if v, ok := d.GetOk("destination_region"); ok {
// input.DestinationRegion = aws.String(v.(string))
// }

if v, ok := d.GetOk(names.AttrKMSKeyID); ok {
input.KmsKeyId = aws.String(v.(string))
}
@@ -184,6 +179,18 @@ func resourceSnapshotCopyCreate(ctx context.Context, d *schema.ResourceData, met

if v, ok := d.GetOk("presigned_url"); ok {
input.PreSignedUrl = aws.String(v.(string))
} else if v, ok := d.GetOk("destination_region"); ok {
output, err := rds.NewPresignClient(conn, func(o *rds.PresignOptions) {
o.ClientOptions = append(o.ClientOptions, func(o *rds.Options) {
o.Region = v.(string)
})
}).PresignCopyDBSnapshot(ctx, input)

if err != nil {
return sdkdiag.AppendErrorf(diags, "presigning RDS DB Snapshot Copy (%s) request: %s", targetDBSnapshotID, err)
}

input.PreSignedUrl = aws.String(output.URL)
}

output, err := conn.CopyDBSnapshot(ctx, input)