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

Elasticache awssdkv2 migration #38046

Merged
merged 23 commits into from
Jul 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
11d274e
elasticache: Migrate to AWS SDK v2
mattburgess Jun 18, 2024
3f60fef
gopatch
mattburgess Jun 18, 2024
cddf5ef
make gen
mattburgess Jun 18, 2024
d2639e8
d/elasticache_cluster, r/elasticache_cluster: Migrate to AWS SDK v2
mattburgess Jun 18, 2024
a608d5d
r/elasticache_global_replication_group: Migrate to AWS SDK v2
mattburgess Jun 18, 2024
af6a3b2
r/elasticache_parameter_group: Migrate to AWS SDK v2
mattburgess Jun 18, 2024
de54827
d/elasticache_replication_group, r/elasticache_replication_group: Mig…
mattburgess Jun 19, 2024
42e69af
d/elasticache_subnet_group,r/elasticache_subnet_group: Migrate to AWS…
mattburgess Jun 19, 2024
90ce16e
d/elasticache_user, r/elasticache_user: Migrate to AWS SDK v2
mattburgess Jun 19, 2024
6a8279b
r/elasticache_user_group: Migrate to AWS SDK v2
mattburgess Jun 19, 2024
cdfb042
r/elasticache_user_group_association: Migrate to AWS SDK v2
mattburgess Jun 19, 2024
3886977
elasticache: Last AWS SDK v2 fixes
mattburgess Jun 19, 2024
0cf90df
Merge branch 'main' into HEAD
ewbankkit Jul 13, 2024
110bed4
'service.go' -> 'consts.go'.
ewbankkit Jul 13, 2024
79282c7
aws_elasticache_cluster: Tidy up.
ewbankkit Jul 13, 2024
7100a05
elasticache: Cosmetics.
ewbankkit Jul 13, 2024
38221ef
elasticache: Reduce visibility.
ewbankkit Jul 13, 2024
815933a
elasticache: Tidy up sweepers.
ewbankkit Jul 13, 2024
1146740
Fix golangci-lint 'whitespace'.
ewbankkit Jul 13, 2024
2b9bfeb
Fix golangci-lint 'mnd'.
ewbankkit Jul 13, 2024
622b260
Remove 'TestAccElastiCacheReplicationGroupDataSource_nonExistent'.
ewbankkit Jul 15, 2024
220ad9a
elasticache: More visibility reduction.
ewbankkit Jul 15, 2024
e77fcb4
Fix golangci-lint 'unused'.
ewbankkit Jul 15, 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
elasticache: Reduce visibility.
ewbankkit committed Jul 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 38221ef3f68769b5169f5c7e0843ce26b73cef3c
4 changes: 2 additions & 2 deletions internal/service/elasticache/engine_version.go
Original file line number Diff line number Diff line change
@@ -187,11 +187,11 @@ func setEngineVersionRedis(d *schema.ResourceData, version *string) error {
return nil
}

type VersionDiff [3]int
type versionDiff [3]int

// diffVersion returns a diff of the versions, component by component.
// Only reports the first diff, since subsequent segments are unimportant for us.
func diffVersion(n, o *gversion.Version) (result VersionDiff) {
func diffVersion(n, o *gversion.Version) (result versionDiff) {
if n.String() == o.String() {
return
}
4 changes: 4 additions & 0 deletions internal/service/elasticache/exports_test.go
Original file line number Diff line number Diff line change
@@ -42,3 +42,7 @@ var (
ValidMemcachedVersionString = validMemcachedVersionString
ValidRedisVersionString = validRedisVersionString
)

type (
VersionDiff = versionDiff
)
4 changes: 2 additions & 2 deletions internal/service/elasticache/sweep.go
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ func sweepGlobalReplicationGroups(region string) error {
grgGroup.Go(func() error {
id := aws.ToString(globalReplicationGroup.GlobalReplicationGroupId)

disassociationErrors := DisassociateMembers(ctx, conn, globalReplicationGroup)
disassociationErrors := disassociateMembers(ctx, conn, globalReplicationGroup)
if disassociationErrors != nil {
return fmt.Errorf("disassociating ElastiCache Global Replication Group (%s) members: %w", id, disassociationErrors)
}
@@ -415,7 +415,7 @@ func sweepUserGroups(region string) error {
return nil
}

func DisassociateMembers(ctx context.Context, conn *elasticache.Client, globalReplicationGroup awstypes.GlobalReplicationGroup) error {
func disassociateMembers(ctx context.Context, conn *elasticache.Client, globalReplicationGroup awstypes.GlobalReplicationGroup) error {
var membersGroup multierror.Group

for _, member := range globalReplicationGroup.Members {