diff --git a/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb b/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb index a881d9bcd..62bdb00e1 100644 --- a/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +++ b/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb @@ -72,11 +72,9 @@ module Fog end if tags = options.delete('Tags') - tags.each_with_index do |(key, value), i| - options["Tags.member.#{i+1}.Key"] = key.to_s # turns symbol into string - options["Tags.member.#{i+1}.Value"] = value - end + options.merge!(AWS.indexed_param("Tags.member.%d", [*tags])) end + if termination_policies = options.delete('TerminationPolicies') options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies])) end