-
Notifications
You must be signed in to change notification settings - Fork 52
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
some alternative.. #5
Comments
Seems like it's actually setup just fine, the docs here: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#describeVolumes-property Indicate that the "tag-key" filter just looks for a tag with the supplied name, so for a specific volume, you can set "tagKeyValue" to something like "Backup_Enabled" and create a tag with the name "Backup_Enabled" on the volume, and give it whatever value you want (perhaps "true") and it will all work- |
Hello chriszrc, thanks for the reply. You are correct. Sorry for misunderstanding for the creator's meaning. Author is only to looking for the tag key and not care about the tag value. However, if line 64 changed to Name: "tag:key" can also be used to specify what key and value to search for. For example: This will have StepFunction to look for tag key="key" and tag value="StepFunctionTarget" which is also working. Sounds stupid, but, however, it can be configured further at line 64 to "tag:BackupEnabled". Then the effect will be like: tag key: BackupEnabled Then, we can change the value of the tag anytime to false(as long as it's not true) to turn off backup copy to DR region. The originally way need to rename the tag key or remove the tag completely in order to turn off. Does my thought make sense? maybe a little? lol... Anyway, my thoughts may cause confusion to people who is watching this. To anyone whom may read the message, please stay to the author's method if you did not understand about the effect between 'tag-key' and 'tag:key'. I don't intend to cause confusion, sorry. |
Hi, yes that makes sense, it's true that your approach would allow you to turn off the snapshotting based on the value of the key, rather than having to change the key name or delete the key entirely. But for someone just starting with this repo, and who isn't familiar with the nuances of the different filters, there's no need to ask them to change the source code, since the example will work fine- |
yes, you're correct. Therefore, I change the title to "some alternative" just for reference. Thank you for reminding. cheers |
https://github.com/aws-samples/aws-step-functions-ebs-snapshot-mgmt/blob/master/TagSnapshots.js
Line 64
Name: "tag-key"
The alternative syntax can be changed to Name: "tag:key". Then, users can tag their volumes with 'key' and desire value if they would like to specify what volumes should be applied for the solution
Volume tag example:
tag KEY tag VALUE
key [whatever defined in Lambda function or specified when deployed via the CFN]
Then, we can change the value of the tag value to another value to turn off backup copy to DR region. The originally way need to rename the tag key or remove the tag completely in order to turn off.
The text was updated successfully, but these errors were encountered: