Get ElasticSearch automatic role generation working #320
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.
This PR gets automatic role generation working, when using elastic search service as a data source, as discussed on #233
Rather than overload the
endpoint
config key, this PR adds an optionaldomain
config key which is to be a reference to a resource of typeAWS::Elasticsearch::Domain
.If
domain
is provided,endpoint
no longer needs to be provided - it is automatically derived from thedomain
reference.This also adds
es:ESHttpPatch
to the list of actions enabled by automatic role generation, since it's one of the 6 basic ones listed in the AWS docs on ElasticSearch IAM roles.I wouldn't view this as a backward-incompatible change because the previous version of this (with the overloaded
endpoint
key), AFAIK, didn't work.I'm now using this on a live personal deployment of mine with the following config:
Short and sweet.
Let me know if there's any changes or tweaks you'd like to see, thanks & cheers