Amazon EC2 - Fixing how the Monitoring.Enabled field is set for spot requests

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
Dave Henderson 2015-05-30 21:15:37 -04:00
parent cef1686b33
commit 904acb914a
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 {