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
Aws autoscaling/fix tag assignment #2208
Aws autoscaling/fix tag assignment #2208
Conversation
options["Tags.member.#{i+1}.#{key}"] = value unless value.nil? | ||
end | ||
i=0 | ||
tags.each do |key, 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.
it looks like you could still use each_with_index
here, just without the inner each
loop.
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 think each_with_index would be a bit cleaner, just need to ensure you do index+1 since it starts at 1.
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.
Good idea!
@restebanez I'm not sure if I follow the issue related to defaults. Could you explain an example maybe? Thanks! |
I noticed the error in a one month old branch, i didn't realize that it was solved 12 days ago: #2161. Sorry for the confusion. The tags problem wasn't fixed so i'll keep the PR with that part |
@restebanez - no problem, just wanted to focus on the problem-at-hand if possible. Thanks! |
…eation Aws autoscaling/fix tag assignment
So since this now takes just a hash, the other possible parameters can't be sent to AWS. Also, the documentation wasn't fixed above and is now wrong. This seems more detrimental than good. |
Also, it seems that the mock in this case is also quite wrong. The result from AWS would be what was originally being passed in: An array of hashes. What's being passed in is now just a hash. There should be logic around this. |
@tlunter not sure I follow, at a glance at least it appears that the non-tag parameters should go through as before. Could you elaborate on what I missed so I can work to fix it? Thanks. |
@geemus [
{
'Key' => 'my_key',
'Value' => 'my_value',
'PropagateAtLaunch' => 'false',
'ResourceId' => '',
'ResourceType' => ''
}
] Now all of these weren't necessary every time, but should anyone wish to change values they are now locked out of it. Also, the response from describe_auto_scaling_groups comes back like this, not as a hash like {
'Key' => 'Value'
} The mock in this case is incorrect since the mapping of tags changes on the response. The Real response has tags mapped like the top version, but the Mock response has tags like the bottom. My comment on the documentation being wrong is directly tied to the Tags portion. |
@tlunter got it. Would you be up for helping us fix it? |
I'll be taking a look into it. |
Awesome, thank you. On Thu, Nov 14, 2013 at 8:39 AM, Todd Lunter notifications@github.comwrote:
|
hi @geemus,
This PR fixes the tags assignment when an auto scaling group is created. It now accepts a hash instead of an array of hashes.
Rodrigo