Merge pull request #1276 from hairyhenderson/amazonec2-spot-instance-monitoring-fix

Amazon EC2 - Fixing how the Monitoring.Enabled field is set for spot requests
This commit is contained in:
Evan Hazlett 2015-05-30 23:02:21 -04:00
commit eb5729d9e1
1 changed files with 2 additions and 2 deletions

View File

@ -248,9 +248,9 @@ func (e *EC2) RequestSpotInstances(amiId string, instanceType string, zone strin
v.Set("LaunchSpecification.NetworkInterface.0.SubnetId", subnetId)
v.Set("LaunchSpecification.NetworkInterface.0.AssociatePublicIpAddress", "1")
if monitoring {
v.Set("Monitoring.Enabled", "1")
v.Set("LaunchSpecification.Monitoring.Enabled", "1")
} else {
v.Set("Monitoring.Enabled", "0")
v.Set("LaunchSpecification.Monitoring.Enabled", "0")
}
if len(role) > 0 {