mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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
|
||||
}
|
||||
|
||||
if rootDeviceName == nil {
|
||||
return nil, fmt.Errorf("[WARN] Error finding Root Device Name for AMI (%s)", ami)
|
||||
}
|
||||
|
||||
return rootDeviceName, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user