Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adding support for elasticache user groups.
A user only has access to the ElastiCache replication group or cluster only if it is part of the User Group associated with a particular cluster.
We are using a best effort approach to bootstrap the configuration for the user if needed while respecting any prior configuration that may be already in place:
Modifying a user group is an extremely slow operation so we do our best to return as soon as it is safe and keep the number of modifications to a minimum.
Locking is handled AWS side. Whenever a resource is modified is can be in one of the 4 following states:
active, creating, deleting, modifying
A resource can only be modified when it is
active
and a non-active resource will always either disappear or return active once the on-going operation is completed. For this reason we block during entry but not during exit as AWS is responsible to "release" the lock, or return to an active state.For these reasons waiting for the active state before returning is simply slowing things down.
We also need to be defensive and block until the active state is achieved before any operations because the cluster could be modified by a system different than vault or a user via a manual operation; so only waiting for an operation to complete before returning does not guarantee a new subsequent request is safe to proceed without blocking upon entry.
Contributor Checklist