Skip to content
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

Add support for disk interface in google_compute_instance #121

Conversation

jbarbuto
Copy link

This allows specifying the disk interface as documented at
https://cloud.google.com/compute/docs/reference/latest/instances#resource-representations

It addresses #24

$ make testacc TESTARGS='-run=TestAccComputeInstance_local_ssd'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccComputeInstance_local_ssd -timeout 120m
?   	github.com/terraform-providers/terraform-provider-google	[no test files]
=== RUN   TestAccComputeInstance_local_ssd
--- PASS: TestAccComputeInstance_local_ssd (66.80s)
=== RUN   TestAccComputeInstance_local_ssd_nvme
--- PASS: TestAccComputeInstance_local_ssd_nvme (64.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-google/google	130.834s

@@ -131,6 +131,11 @@ the type is "local-ssd", in which case scratch must be true).
* `scratch` - (Optional) Whether the disk is a scratch disk as opposed to a
persistent disk (required for local-ssd).

* `interface` - (Optional) Specifies the disk interface to use for attaching this disk,
which is either SCSI or NVME. The default is SCSI. Persistent disks must always use
SCSI and the request will fail if you attempt to attach a persistent disk in any
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be preferable to enforce the persistent disk restriction in the terraform code?

@jbarbuto
Copy link
Author

This builds off the effort in hashicorp/terraform#13026 which appears to have been abandoned 😕

@catsby
Copy link
Contributor

catsby commented Jun 15, 2017

Hi there! Thanks for opening this. I'm wondering if this conflicts with #123 , do you have any thoughts?

@jbarbuto
Copy link
Author

Appears so yes, I'm fine with closing this PR then. Glad to see it implemented in some form or another 🎉

@danawillow
Copy link
Contributor

Thanks @jbarbuto! Hope I didn't waste too much of your time :(

@jbarbuto
Copy link
Author

@danawillow No worries, it was a good opportunity to learn Terraform internals which may come in handy later :)

@jbarbuto jbarbuto closed this Jun 15, 2017
@jbarbuto jbarbuto deleted the add-compute-instance-disk-interface branch June 15, 2017 20:27
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
@ghost
Copy link

ghost commented Mar 31, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants