hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.26k stars 1.71k forks source link

Notebooks API support #6494

Closed gogasca closed 4 years ago

gogasca commented 4 years ago

Community Note

Description

We recently launched Notebooks API (Beta), which allows you to create and manage Google Cloud AI Platform Notebooks, we provide a sdk via "gcloud beta notebooks" and REST API Currently for Terraform we use the Google Cloud Compute Engine but want to support this natively. https://github.com/GoogleCloudPlatform/ai-platform-samples/tree/master/notebooks/tools/terraform

New or Affected Resource(s)

Potential Terraform Configuration

resource "random_id" "instance_id" {
  byte_length = 8
}

resource "google_notebooks_instance" "default" {
  name         = "vm-${random_id.instance_id.hex}"
  machine_type = var.instance_type
  location         = var.location

  boot_disk {
    initialize_params {
      image = "deeplearning-platform-release/tf-ent-latest-gpu" # TensorFlow Enterprise
      size  = 50                                                // 50 GB Storage
    }
  }

  network_interface {
    network = "default"
    access_config {}
  }

  guest_accelerator {
    type  = var.gpu_type
    count = var.gpu_count
  }

  scheduling {
    automatic_restart   = true
    on_host_maintenance = "TERMINATE"
  }

  service_account {
    scopes = ["https://www.googleapis.com/auth/cloud-platform"]
  }
}

References

https://cloud.google.com/sdk/gcloud/reference/beta/notebooks https://cloud.google.com/ai-platform/notebooks/docs/reference/rest

I would like to get information in how to get started, I will be willing to create this module.

danawillow commented 4 years ago

Closing as duplicate of https://github.com/terraform-providers/terraform-provider-google/issues/5879

ghost commented 4 years ago

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 👉 hashibot-feedback@hashicorp.com. Thanks!