How to provide image name in gcp terraform script?

Viewed 3209
3 Answers

if you are looking for standard images available from GCP run following command and grep the type of image.

gcloud compute images list | grep ubuntu

it will list something like following. First column is NAME second is PROJECT and third is FAMILY. In script you can mention the Project/Family (ubuntu-os-cloud/ubuntu-1804-lts)

ubuntu-1604-xenial-v20210329a      ubuntu-os-cloud      ubuntu-1604-lts        
ubuntu-1804-bionic-v20210325       ubuntu-os-cloud      ubuntu-1804-lts      

As you want to deploy the image, it seems the framework is TensorFlow Enterprise 2.1 (CUDA 10.1).

As the documentation, we have listed the most recent versions of image families, organized by framework type. Creating an instance by referencing an image family with the “latest” in the name ensures that you always get the most recent version of that image. So from the documentation, we could have the image name as required.

I hope documentation and this other one also informative for you.

Here you are referring to a marketplace image. You can change it in the main.tf

initialize_params {
  image = "debian-cloud/debian-9"

You can list images using #gcloud compute images list redhat It will list all the image references to redhat releases.

Related