Skip to content

Commit

Permalink
When specifying network_interfaces in the request body, you cannot sp…
Browse files Browse the repository at this point in the history
…ecify subnet_id at the top level, it must be specified on the network_interface. Fixes #72
  • Loading branch information
tyler-ball committed May 20, 2015
1 parent b88cea1 commit b015536
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/kitchen/driver/aws/instance_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def ec2_instance_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
:device_index => 0,
:associate_public_ip_address => config[:associate_public_ip]
}]
# If specifying `:network_interfaces` in the request, you must specify the
# subnet_id in the network_interfaces block and not at the top level
if config[:subnet_id]
i[:network_interfaces][0][:subnet_id] = i.delete(:subnet_id)
end
end
i
end
Expand Down

0 comments on commit b015536

Please sign in to comment.