Terraform: Support for GCP Image Family when provisioning instances

Created on 8 Jul 2016  ยท  4Comments  ยท  Source: hashicorp/terraform

When provisioning GCP instances off of public images, it appears that Google is moving to the use of the "image family" api, rather than the specific project/image format. This is shown in their documentation both here and here.

In addition to the current image argument in the google_compute_instance.disk block, there should be the option to instead use the image family api endpoint

enhancement providegoogle-cloud

Most helpful comment

This already works if you specify a full URL in the disk { image = ... } field.

For a public image family:

https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-8

For a private image family:

https://www.googleapis.com/compute/v1/projects/my-project/global/images/family/my-family

It might be nice if it worked without the full URL though.

All 4 comments

This already works if you specify a full URL in the disk { image = ... } field.

For a public image family:

https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-8

For a private image family:

https://www.googleapis.com/compute/v1/projects/my-project/global/images/family/my-family

It might be nice if it worked without the full URL though.

Thanks for this, @zbjornson. Confirmed that specifying the full URL does indeed work.

Closed via #8083

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings