-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't specify snapshots on Google Compute #902
Comments
The underlying instance API does not allow creating a disk from a snapshot, only an image. In fact it only allows creating the first disk (the boot disk) from an image. The rest have to be existing disks. The Cloud Console actually implemented the operation you have screenshotted as two POST requests, which you can see by clicking on the "Equivalent REST" link at the bottom. That is not the case if you initialize the disk from an image as there is a special sourceImage field in the create instance API. We could replicate the console behavior, but I'd actually rather not as I see Terraform mirroring the underlying resources in a 1:1 fashion (the Google commandline utility gcloud also does not implement this convenience feature). I will submit a PR to allow something like the following, would that be sufficient for you?
|
That would be great, thank you. |
Fixed by #1426 |
how to give dynamic name to the instance id |
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. |
Currently, it appears that you can only create instances on google compute using images.
Terraform should also support using snapshots.
The text was updated successfully, but these errors were encountered: