Hi,
I have a vmdk img in my aws s3 bucket.
I want to import ami from this vmdk.
I tried to create ebs snapshot from the vmdk and then create ami form this snapshot.
But when Im trying to lunch new instance it failing in status checks and i cant get any log.
I have all the relevant roles.
Also, when Im using aws cli to create ami from the same vmdk its working without any issue
resource "aws_ebs_snapshot_import" "my_snapshot" {
disk_container {
format = "VMDK"
user_bucket {
s3_bucket = "${var.bucket_name}"
s3_key = "${local.vmdk_name}"
}
}
role_name = "vmimport"
}
resource "aws_ami" "my_ami" {
name = "my_ami"
virtualization_type = "hvm"
depends_on = [aws_ebs_snapshot_import.my_snapshot]
ebs_block_device {
device_name = "/dev/sda1"
snapshot_id = aws_ebs_snapshot_import.my_snapshot.id
volume_size = 500
}
}
The status cjeck of the ibstance I created from the ami: