-
Notifications
You must be signed in to change notification settings - Fork 17
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
[ENH] Improve AWS resource tagging and allow user to provide custom tags #249
Conversation
): | ||
raise ValueError( | ||
"If additional_tags is a list, it must be a list of " | ||
"dictionaries of the form {'Key': key_val, 'Value': " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a whacky format. Is there a good reason this is not: {key_val: value_val}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's weird. Blame it on AWS and boto3:
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecr.html#ECR.Client.tag_resource
They expect a list of dictionaries of the form
{"Key": key_val, "Value": value_val}
I wanted to keep both options for parameter input validation so that weirdos who know the AWS format can supply it. And normal folks can also supply a regular python dictionary.
But if this is too ugly for you to bear, we can require the regular python dictionary and then convert it behind the scenes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I suspected this is an AWS weirdness. So long as we support a normal API for normal people...
Looks good to me! Is it ready to merge? |
Yep! 🚀 |
Resolves #248