Merge pull request #2646 from hashicorp/b-aws-error-root-device
provider/aws: Error when unable to find a Root Block Device name
This commit is contained in:
commit
b3ac87ed19
|
@ -778,6 +778,10 @@ func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) {
|
||||||
rootDeviceName = image.BlockDeviceMappings[0].DeviceName
|
rootDeviceName = image.BlockDeviceMappings[0].DeviceName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rootDeviceName == nil {
|
||||||
|
return nil, fmt.Errorf("[WARN] Error finding Root Device Name for AMI (%s)", ami)
|
||||||
|
}
|
||||||
|
|
||||||
return rootDeviceName, nil
|
return rootDeviceName, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue