"rr" is already an array of hashes, right? Why are you putting it in
another array (making it an array of an array of hashes, where the first
array is one item)?

On Mon, Mar 30, 2015 at 6:05 PM Brandon Metcalf <bwmetcalf / gmail.com> wrote:

> The following code snippet
>
> @options.mxserver.each do |m|
>   rr.push({:value => "#{@options.mxpriority} #{m}."})
> end
> rrsets.create(fqdn, 'MX', :ttl => @options.ttl, :resource_records => [rr])
>
> uses the aws-sdk gem to create a DNS record with multiple MX records.
> However, it fails with
>
> #<ArgumentError: expected hash value for member 0 of :resource_records>
>
> rrsets.create() expects a list of hashes as the value for the
> :resource_records key.  If I select, say, the first element with
>
> :resource_records => rr[0]
>
> It works fine.  Any ideas?
>