-
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
Allow disk field in google_compute_instance to have a count parameter #12755
Comments
Hey @oridistor! Sorry for the late reply. So you've got a couple things here worth commenting on. The first is trying to set count on the The second problem is a bit more fundamental, and I don't have a workaround for you at the moment: how to attach disks created with I just talked with @danawillow today about #12398 and making attaching/detaching disks a bit easier, but I'm not sure that would cover this use case. Maybe it's worth having a |
Actually, the |
So it turns out that attaching a disk later only works for persistent disks, not scratch disks. Unfortunately because of the way the API is, there's nothing we can do about that without a lot of extra hacking around. I'm going to go ahead and close this, but thanks again for reporting the issue and please keep them coming! |
@danawillow Sorry to bring this from the grave, but is it possible today to create a scratch disk outside of Cheers! |
I'm taking a break from TF at the moment so I don't want to discuss this too much, but as far as I know there is not. |
@danawillow Thank you, I'll continue waiting on .12. If this is still not possible then, I'll make a new issue in the proper repository. Cheers! |
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. |
Terraform Version
0.8.4
Affected Resource(s)
Terraform Configuration Files
resource "google_compute_instance" "node" {
count = "${var.number_of_nodes}"
}
Expected Behavior
I would've liked to be able to write count = 4 in the following segment:
disk {
type = "local-ssd"
scratch = true
device_name = "ephemeral"
}
so I can define several scratch disks at once, and then use count.index in device_name to differenitate between them.
Actual Behavior
Right now it's not possible, and I have to create a different module for any number of scratch disks I want to attach
The text was updated successfully, but these errors were encountered: