mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fix: tags implementation was defective
This commit is contained in:
parent
16124a9243
commit
4576b38d66
1 changed files with 7 additions and 4 deletions
|
@ -72,16 +72,19 @@ module Fog
|
|||
if load_balancer_names = options.delete('LoadBalancerNames')
|
||||
options.merge!(AWS.indexed_param('LoadBalancerNames.member.%d', [*load_balancer_names]))
|
||||
end
|
||||
|
||||
if tags = options.delete('Tags')
|
||||
tags.each_with_index do |tag, i|
|
||||
tag.each do |key, value|
|
||||
options["Tags.member.#{i+1}.#{key}"] = value unless value.nil?
|
||||
end
|
||||
i=0
|
||||
tags.each do |key, value|
|
||||
i += 1
|
||||
options["Tags.member.#{i}.Key"] = key.to_s # turns symbol into string
|
||||
options["Tags.member.#{i}.Value"] = value
|
||||
end
|
||||
end
|
||||
if termination_policies = options.delete('TerminationPolicies')
|
||||
options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies]))
|
||||
end
|
||||
|
||||
request({
|
||||
'Action' => 'CreateAutoScalingGroup',
|
||||
'AutoScalingGroupName' => auto_scaling_group_name,
|
||||
|
|
Loading…
Add table
Reference in a new issue