Boot disk should automatically pull latest image from family
Just ran sdt
for the first time in a week or two and got the following warning:
- DEPRECATED_RESOURCE_USED: The resource 'projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220419' is deprecated.
- A suggested replacement is 'projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220607'.
(It still created my VM).
My problem seems to be that I hardcoded
BOOT_DISK_PROJECT, BOOT_DISK_NAME = "ubuntu-os-cloud", "ubuntu-2004-focal-v20220419"
in get_vm_disks()
. Instead, for the boot disk, I should be using get_image_from_family()
function (which returns newest_image
from project
and family
) from gcp_sdk_snippets.py