I’m trying to learn terraform, how do i change image name in the terraform script?
For example, in the below script the default linux image given is debian-cloud/debian-9, how to change the image, say something from marketplace https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning?q=deep%20learning%20vm&id=8857b4a3-f60f-40b2-9b32-22b4428fd256
gcp terraform link – https://www.terraform.io/docs/providers/google/r/compute_instance_template.html
3
Answers
Here you are referring to a marketplace image.
You can change it in the main.tf
You can list images using #gcloud compute images list redhat
It will list all the image references to redhat releases.
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.
if you are looking for standard images available from GCP run following command and grep the type of image.
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)