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

Tagged tables and other resources #47

Open
AnthonySteele opened this issue Mar 3, 2017 · 4 comments
Open

Tagged tables and other resources #47

AnthonySteele opened this issue Mar 3, 2017 · 4 comments

Comments

@AnthonySteele
Copy link
Contributor

We are going to be using tags more and more, in order to mark dynamo tables as belonging to a particular feature. Watchman should be able to using this grouping metadata to apply rules to dynamo tables, and to other resources that support tags.

@AnthonySteele
Copy link
Contributor Author

AnthonySteele commented Feb 26, 2018

Tags are becoming more common and widely used. We have legacy support for dynamo tables and SQS queues and generic support for everything else.

Ideally we want the generic config to support matching on tags for all supported resource types.
This will provide an incentive to migrate dynamo tables and SQS queues to the generic format.

We may want to match combinations of tags, e.g "TeamFoo" and "FeatureBar" and not "isBeta"

@tomhaigh
Copy link
Contributor

tomhaigh commented Mar 1, 2018

Suggest we add two properties to ResourceThreshold - something like ExcludedTags and RequiredTags.

Annoyingly the dynamo api (at least) only has ListTagsOfResource endpoint which only accepts one table at a time. So unless we are prepared to call this for every resource which has been discovered then tagging support for dynamo doesn't seem possible. It doesn't seem ideal for watchman to only support tags on certain resources. (cc @nick4eva )

@tomhaigh
Copy link
Contributor

Having looked at this a while back, the main challenge appears to be that (last time I looked) not all AWS services provide a method to retrieve tags for multiple resources at a time. So, for example, you would end up requesting individual resources for every dynamo table in the account, whereas now we can list and filter dynamo tables in one call.

@tomhaigh
Copy link
Contributor

The approach we discussed was for IResourceSource<T>.GetResourceNamesAsync to return an object containing both the name and set of tags.
The thing that then filters on name can than be extended to also filter on the tags.

The type that is loaded from config, ResourceThresholds<TConfig>, could be extended to have a Tags set and an ExcludedTags set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants