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

Crash when trying to create GCE instance with local-ssd disk #1088

Closed
gmiroshnykov opened this issue Mar 2, 2015 · 2 comments
Closed

Crash when trying to create GCE instance with local-ssd disk #1088

gmiroshnykov opened this issue Mar 2, 2015 · 2 comments

Comments

@gmiroshnykov
Copy link

I think local SSDs are not yet supported by Terraform, but I've tied to "brute force" it anyway and it crashed hard :(

Configuration:

resource "google_compute_instance" "mongodb_tmp_instance" {
    name = "staging-mongodb-instance-3"
    machine_type = "n1-highmem-16"
    zone = "europe-west1-c"
    tags = ["staging", "mongodb"]

    disk {
        image = "ubuntu-trusty"
        type = "pd-ssd"
    }

    disk {
        type = "local-ssd"
        auto_delete = true
    }

    network {
        source = "default"
    }
}

Gist of crash.log

@sparkprime sparkprime self-assigned this May 1, 2015
sparkprime added a commit to sparkprime/terraform that referenced this issue May 12, 2015
@sparkprime
Copy link
Contributor

So the crash was due to a bug when specifying type but not source / image. That is in fact only valid in the case of local ssds but it's fixed now.

The only change you need to make to use local-ssd is to add an extra attribute to the disk: scratch = true, which corresponds to the type = "SCRATCH" attribute from the APIs. Unfortunately initializeParams.diskType is already represented as "type", causing a name clash, but the enum only has two values in it at present so I represented as a boolean for now.

Long term, I'd like to rewrite the disk support entirely to allow modifying disks without forcenew (as is already done by @phinze for AWS). Since that will require a deprecation cycle, I will make the attributes more closely align to the GCE API at that time.

sparkprime added a commit that referenced this issue May 12, 2015
@ghost
Copy link

ghost commented May 2, 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 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.

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

No branches or pull requests

3 participants