Skip to content

Commit eb5729d

Browse files
committed
Merge pull request docker-archive-public#1276 from hairyhenderson/amazonec2-spot-instance-monitoring-fix
Amazon EC2 - Fixing how the Monitoring.Enabled field is set for spot requests
2 parents cef1686 + 904acb9 commit eb5729d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/amazonec2/amz/ec2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ func (e *EC2) RequestSpotInstances(amiId string, instanceType string, zone strin
248248
v.Set("LaunchSpecification.NetworkInterface.0.SubnetId", subnetId)
249249
v.Set("LaunchSpecification.NetworkInterface.0.AssociatePublicIpAddress", "1")
250250
if monitoring {
251-
v.Set("Monitoring.Enabled", "1")
251+
v.Set("LaunchSpecification.Monitoring.Enabled", "1")
252252
} else {
253-
v.Set("Monitoring.Enabled", "0")
253+
v.Set("LaunchSpecification.Monitoring.Enabled", "0")
254254
}
255255

256256
if len(role) > 0 {

0 commit comments

Comments
 (0)