com.pulumi.gcp.notebooks.kotlin.RuntimeArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.notebooks.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.notebooks.RuntimeArgs.builder
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeAccessConfigArgs
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeAccessConfigArgsBuilder
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeSoftwareConfigArgs
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeSoftwareConfigArgsBuilder
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeVirtualMachineArgs
import com.pulumi.gcp.notebooks.kotlin.inputs.RuntimeVirtualMachineArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A Cloud AI Platform Notebook runtime.
* > **Note:** Due to limitations of the Notebooks Runtime API, many fields
* in this resource do not properly detect drift. These fields will also not
* appear in state once imported.
* To get more information about Runtime, see:
* * [API documentation](https://cloud.google.com/ai-platform/notebooks/docs/reference/rest)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/ai-platform-notebooks)
* ## Example Usage
* ### Notebook Runtime Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const runtime = new gcp.notebooks.Runtime("runtime", {
* name: "notebooks-runtime",
* location: "us-central1",
* accessConfig: {
* accessType: "SINGLE_USER",
* runtimeOwner: "[email protected]",
* },
* virtualMachine: {
* virtualMachineConfig: {
* machineType: "n1-standard-4",
* dataDisk: {
* initializeParams: {
* diskSizeGb: 100,
* diskType: "PD_STANDARD",
* },
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* runtime = gcp.notebooks.Runtime("runtime",
* name="notebooks-runtime",
* location="us-central1",
* access_config=gcp.notebooks.RuntimeAccessConfigArgs(
* access_type="SINGLE_USER",
* runtime_owner="[email protected]",
* ),
* virtual_machine=gcp.notebooks.RuntimeVirtualMachineArgs(
* virtual_machine_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigArgs(
* machine_type="n1-standard-4",
* data_disk=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs(
* initialize_params=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs(
* disk_size_gb=100,
* disk_type="PD_STANDARD",
* ),
* ),
* ),
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var runtime = new Gcp.Notebooks.Runtime("runtime", new()
* {
* Name = "notebooks-runtime",
* Location = "us-central1",
* AccessConfig = new Gcp.Notebooks.Inputs.RuntimeAccessConfigArgs
* {
* AccessType = "SINGLE_USER",
* RuntimeOwner = "[email protected]",
* },
* VirtualMachine = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineArgs
* {
* VirtualMachineConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigArgs
* {
* MachineType = "n1-standard-4",
* DataDisk = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs
* {
* InitializeParams = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs
* {
* DiskSizeGb = 100,
* DiskType = "PD_STANDARD",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := notebooks.NewRuntime(ctx, "runtime", ¬ebooks.RuntimeArgs{
* Name: pulumi.String("notebooks-runtime"),
* Location: pulumi.String("us-central1"),
* AccessConfig: ¬ebooks.RuntimeAccessConfigArgs{
* AccessType: pulumi.String("SINGLE_USER"),
* RuntimeOwner: pulumi.String("[email protected]"),
* },
* VirtualMachine: ¬ebooks.RuntimeVirtualMachineArgs{
* VirtualMachineConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigArgs{
* MachineType: pulumi.String("n1-standard-4"),
* DataDisk: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs{
* InitializeParams: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs{
* DiskSizeGb: pulumi.Int(100),
* DiskType: pulumi.String("PD_STANDARD"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.notebooks.Runtime;
* import com.pulumi.gcp.notebooks.RuntimeArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeAccessConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var runtime = new Runtime("runtime", RuntimeArgs.builder()
* .name("notebooks-runtime")
* .location("us-central1")
* .accessConfig(RuntimeAccessConfigArgs.builder()
* .accessType("SINGLE_USER")
* .runtimeOwner("[email protected]")
* .build())
* .virtualMachine(RuntimeVirtualMachineArgs.builder()
* .virtualMachineConfig(RuntimeVirtualMachineVirtualMachineConfigArgs.builder()
* .machineType("n1-standard-4")
* .dataDisk(RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs.builder()
* .initializeParams(RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs.builder()
* .diskSizeGb("100")
* .diskType("PD_STANDARD")
* .build())
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* runtime:
* type: gcp:notebooks:Runtime
* properties:
* name: notebooks-runtime
* location: us-central1
* accessConfig:
* accessType: SINGLE_USER
* runtimeOwner: [email protected]
* virtualMachine:
* virtualMachineConfig:
* machineType: n1-standard-4
* dataDisk:
* initializeParams:
* diskSizeGb: '100'
* diskType: PD_STANDARD
* ```
*
* ### Notebook Runtime Basic Gpu
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const runtimeGpu = new gcp.notebooks.Runtime("runtime_gpu", {
* name: "notebooks-runtime-gpu",
* location: "us-central1",
* accessConfig: {
* accessType: "SINGLE_USER",
* runtimeOwner: "[email protected]",
* },
* softwareConfig: {
* installGpuDriver: true,
* },
* virtualMachine: {
* virtualMachineConfig: {
* machineType: "n1-standard-4",
* dataDisk: {
* initializeParams: {
* diskSizeGb: 100,
* diskType: "PD_STANDARD",
* },
* },
* acceleratorConfig: {
* coreCount: 1,
* type: "NVIDIA_TESLA_V100",
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* runtime_gpu = gcp.notebooks.Runtime("runtime_gpu",
* name="notebooks-runtime-gpu",
* location="us-central1",
* access_config=gcp.notebooks.RuntimeAccessConfigArgs(
* access_type="SINGLE_USER",
* runtime_owner="[email protected]",
* ),
* software_config=gcp.notebooks.RuntimeSoftwareConfigArgs(
* install_gpu_driver=True,
* ),
* virtual_machine=gcp.notebooks.RuntimeVirtualMachineArgs(
* virtual_machine_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigArgs(
* machine_type="n1-standard-4",
* data_disk=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs(
* initialize_params=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs(
* disk_size_gb=100,
* disk_type="PD_STANDARD",
* ),
* ),
* accelerator_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigAcceleratorConfigArgs(
* core_count=1,
* type="NVIDIA_TESLA_V100",
* ),
* ),
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var runtimeGpu = new Gcp.Notebooks.Runtime("runtime_gpu", new()
* {
* Name = "notebooks-runtime-gpu",
* Location = "us-central1",
* AccessConfig = new Gcp.Notebooks.Inputs.RuntimeAccessConfigArgs
* {
* AccessType = "SINGLE_USER",
* RuntimeOwner = "[email protected]",
* },
* SoftwareConfig = new Gcp.Notebooks.Inputs.RuntimeSoftwareConfigArgs
* {
* InstallGpuDriver = true,
* },
* VirtualMachine = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineArgs
* {
* VirtualMachineConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigArgs
* {
* MachineType = "n1-standard-4",
* DataDisk = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs
* {
* InitializeParams = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs
* {
* DiskSizeGb = 100,
* DiskType = "PD_STANDARD",
* },
* },
* AcceleratorConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigAcceleratorConfigArgs
* {
* CoreCount = 1,
* Type = "NVIDIA_TESLA_V100",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := notebooks.NewRuntime(ctx, "runtime_gpu", ¬ebooks.RuntimeArgs{
* Name: pulumi.String("notebooks-runtime-gpu"),
* Location: pulumi.String("us-central1"),
* AccessConfig: ¬ebooks.RuntimeAccessConfigArgs{
* AccessType: pulumi.String("SINGLE_USER"),
* RuntimeOwner: pulumi.String("[email protected]"),
* },
* SoftwareConfig: ¬ebooks.RuntimeSoftwareConfigArgs{
* InstallGpuDriver: pulumi.Bool(true),
* },
* VirtualMachine: ¬ebooks.RuntimeVirtualMachineArgs{
* VirtualMachineConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigArgs{
* MachineType: pulumi.String("n1-standard-4"),
* DataDisk: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs{
* InitializeParams: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs{
* DiskSizeGb: pulumi.Int(100),
* DiskType: pulumi.String("PD_STANDARD"),
* },
* },
* AcceleratorConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigAcceleratorConfigArgs{
* CoreCount: pulumi.Int(1),
* Type: pulumi.String("NVIDIA_TESLA_V100"),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.notebooks.Runtime;
* import com.pulumi.gcp.notebooks.RuntimeArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeAccessConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeSoftwareConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigAcceleratorConfigArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var runtimeGpu = new Runtime("runtimeGpu", RuntimeArgs.builder()
* .name("notebooks-runtime-gpu")
* .location("us-central1")
* .accessConfig(RuntimeAccessConfigArgs.builder()
* .accessType("SINGLE_USER")
* .runtimeOwner("[email protected]")
* .build())
* .softwareConfig(RuntimeSoftwareConfigArgs.builder()
* .installGpuDriver(true)
* .build())
* .virtualMachine(RuntimeVirtualMachineArgs.builder()
* .virtualMachineConfig(RuntimeVirtualMachineVirtualMachineConfigArgs.builder()
* .machineType("n1-standard-4")
* .dataDisk(RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs.builder()
* .initializeParams(RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs.builder()
* .diskSizeGb("100")
* .diskType("PD_STANDARD")
* .build())
* .build())
* .acceleratorConfig(RuntimeVirtualMachineVirtualMachineConfigAcceleratorConfigArgs.builder()
* .coreCount("1")
* .type("NVIDIA_TESLA_V100")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* runtimeGpu:
* type: gcp:notebooks:Runtime
* name: runtime_gpu
* properties:
* name: notebooks-runtime-gpu
* location: us-central1
* accessConfig:
* accessType: SINGLE_USER
* runtimeOwner: [email protected]
* softwareConfig:
* installGpuDriver: true
* virtualMachine:
* virtualMachineConfig:
* machineType: n1-standard-4
* dataDisk:
* initializeParams:
* diskSizeGb: '100'
* diskType: PD_STANDARD
* acceleratorConfig:
* coreCount: '1'
* type: NVIDIA_TESLA_V100
* ```
*
* ### Notebook Runtime Basic Container
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const runtimeContainer = new gcp.notebooks.Runtime("runtime_container", {
* name: "notebooks-runtime-container",
* location: "us-central1",
* accessConfig: {
* accessType: "SINGLE_USER",
* runtimeOwner: "[email protected]",
* },
* virtualMachine: {
* virtualMachineConfig: {
* machineType: "n1-standard-4",
* dataDisk: {
* initializeParams: {
* diskSizeGb: 100,
* diskType: "PD_STANDARD",
* },
* },
* containerImages: [
* {
* repository: "gcr.io/deeplearning-platform-release/base-cpu",
* tag: "latest",
* },
* {
* repository: "gcr.io/deeplearning-platform-release/beam-notebooks",
* tag: "latest",
* },
* ],
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* runtime_container = gcp.notebooks.Runtime("runtime_container",
* name="notebooks-runtime-container",
* location="us-central1",
* access_config=gcp.notebooks.RuntimeAccessConfigArgs(
* access_type="SINGLE_USER",
* runtime_owner="[email protected]",
* ),
* virtual_machine=gcp.notebooks.RuntimeVirtualMachineArgs(
* virtual_machine_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigArgs(
* machine_type="n1-standard-4",
* data_disk=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs(
* initialize_params=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs(
* disk_size_gb=100,
* disk_type="PD_STANDARD",
* ),
* ),
* container_images=[
* gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs(
* repository="gcr.io/deeplearning-platform-release/base-cpu",
* tag="latest",
* ),
* gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs(
* repository="gcr.io/deeplearning-platform-release/beam-notebooks",
* tag="latest",
* ),
* ],
* ),
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var runtimeContainer = new Gcp.Notebooks.Runtime("runtime_container", new()
* {
* Name = "notebooks-runtime-container",
* Location = "us-central1",
* AccessConfig = new Gcp.Notebooks.Inputs.RuntimeAccessConfigArgs
* {
* AccessType = "SINGLE_USER",
* RuntimeOwner = "[email protected]",
* },
* VirtualMachine = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineArgs
* {
* VirtualMachineConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigArgs
* {
* MachineType = "n1-standard-4",
* DataDisk = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs
* {
* InitializeParams = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs
* {
* DiskSizeGb = 100,
* DiskType = "PD_STANDARD",
* },
* },
* ContainerImages = new[]
* {
* new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs
* {
* Repository = "gcr.io/deeplearning-platform-release/base-cpu",
* Tag = "latest",
* },
* new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs
* {
* Repository = "gcr.io/deeplearning-platform-release/beam-notebooks",
* Tag = "latest",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := notebooks.NewRuntime(ctx, "runtime_container", ¬ebooks.RuntimeArgs{
* Name: pulumi.String("notebooks-runtime-container"),
* Location: pulumi.String("us-central1"),
* AccessConfig: ¬ebooks.RuntimeAccessConfigArgs{
* AccessType: pulumi.String("SINGLE_USER"),
* RuntimeOwner: pulumi.String("[email protected]"),
* },
* VirtualMachine: ¬ebooks.RuntimeVirtualMachineArgs{
* VirtualMachineConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigArgs{
* MachineType: pulumi.String("n1-standard-4"),
* DataDisk: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs{
* InitializeParams: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs{
* DiskSizeGb: pulumi.Int(100),
* DiskType: pulumi.String("PD_STANDARD"),
* },
* },
* ContainerImages: notebooks.RuntimeVirtualMachineVirtualMachineConfigContainerImageArray{
* ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs{
* Repository: pulumi.String("gcr.io/deeplearning-platform-release/base-cpu"),
* Tag: pulumi.String("latest"),
* },
* ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs{
* Repository: pulumi.String("gcr.io/deeplearning-platform-release/beam-notebooks"),
* Tag: pulumi.String("latest"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.notebooks.Runtime;
* import com.pulumi.gcp.notebooks.RuntimeArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeAccessConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var runtimeContainer = new Runtime("runtimeContainer", RuntimeArgs.builder()
* .name("notebooks-runtime-container")
* .location("us-central1")
* .accessConfig(RuntimeAccessConfigArgs.builder()
* .accessType("SINGLE_USER")
* .runtimeOwner("[email protected]")
* .build())
* .virtualMachine(RuntimeVirtualMachineArgs.builder()
* .virtualMachineConfig(RuntimeVirtualMachineVirtualMachineConfigArgs.builder()
* .machineType("n1-standard-4")
* .dataDisk(RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs.builder()
* .initializeParams(RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs.builder()
* .diskSizeGb("100")
* .diskType("PD_STANDARD")
* .build())
* .build())
* .containerImages(
* RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs.builder()
* .repository("gcr.io/deeplearning-platform-release/base-cpu")
* .tag("latest")
* .build(),
* RuntimeVirtualMachineVirtualMachineConfigContainerImageArgs.builder()
* .repository("gcr.io/deeplearning-platform-release/beam-notebooks")
* .tag("latest")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* runtimeContainer:
* type: gcp:notebooks:Runtime
* name: runtime_container
* properties:
* name: notebooks-runtime-container
* location: us-central1
* accessConfig:
* accessType: SINGLE_USER
* runtimeOwner: [email protected]
* virtualMachine:
* virtualMachineConfig:
* machineType: n1-standard-4
* dataDisk:
* initializeParams:
* diskSizeGb: '100'
* diskType: PD_STANDARD
* containerImages:
* - repository: gcr.io/deeplearning-platform-release/base-cpu
* tag: latest
* - repository: gcr.io/deeplearning-platform-release/beam-notebooks
* tag: latest
* ```
*
* ### Notebook Runtime Kernels
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const runtimeContainer = new gcp.notebooks.Runtime("runtime_container", {
* name: "notebooks-runtime-kernel",
* location: "us-central1",
* accessConfig: {
* accessType: "SINGLE_USER",
* runtimeOwner: "[email protected]",
* },
* softwareConfig: {
* kernels: [{
* repository: "gcr.io/deeplearning-platform-release/base-cpu",
* tag: "latest",
* }],
* },
* virtualMachine: {
* virtualMachineConfig: {
* machineType: "n1-standard-4",
* dataDisk: {
* initializeParams: {
* diskSizeGb: 100,
* diskType: "PD_STANDARD",
* },
* },
* },
* },
* labels: {
* k: "val",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* runtime_container = gcp.notebooks.Runtime("runtime_container",
* name="notebooks-runtime-kernel",
* location="us-central1",
* access_config=gcp.notebooks.RuntimeAccessConfigArgs(
* access_type="SINGLE_USER",
* runtime_owner="[email protected]",
* ),
* software_config=gcp.notebooks.RuntimeSoftwareConfigArgs(
* kernels=[gcp.notebooks.RuntimeSoftwareConfigKernelArgs(
* repository="gcr.io/deeplearning-platform-release/base-cpu",
* tag="latest",
* )],
* ),
* virtual_machine=gcp.notebooks.RuntimeVirtualMachineArgs(
* virtual_machine_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigArgs(
* machine_type="n1-standard-4",
* data_disk=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs(
* initialize_params=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs(
* disk_size_gb=100,
* disk_type="PD_STANDARD",
* ),
* ),
* ),
* ),
* labels={
* "k": "val",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var runtimeContainer = new Gcp.Notebooks.Runtime("runtime_container", new()
* {
* Name = "notebooks-runtime-kernel",
* Location = "us-central1",
* AccessConfig = new Gcp.Notebooks.Inputs.RuntimeAccessConfigArgs
* {
* AccessType = "SINGLE_USER",
* RuntimeOwner = "[email protected]",
* },
* SoftwareConfig = new Gcp.Notebooks.Inputs.RuntimeSoftwareConfigArgs
* {
* Kernels = new[]
* {
* new Gcp.Notebooks.Inputs.RuntimeSoftwareConfigKernelArgs
* {
* Repository = "gcr.io/deeplearning-platform-release/base-cpu",
* Tag = "latest",
* },
* },
* },
* VirtualMachine = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineArgs
* {
* VirtualMachineConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigArgs
* {
* MachineType = "n1-standard-4",
* DataDisk = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs
* {
* InitializeParams = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs
* {
* DiskSizeGb = 100,
* DiskType = "PD_STANDARD",
* },
* },
* },
* },
* Labels =
* {
* { "k", "val" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := notebooks.NewRuntime(ctx, "runtime_container", ¬ebooks.RuntimeArgs{
* Name: pulumi.String("notebooks-runtime-kernel"),
* Location: pulumi.String("us-central1"),
* AccessConfig: ¬ebooks.RuntimeAccessConfigArgs{
* AccessType: pulumi.String("SINGLE_USER"),
* RuntimeOwner: pulumi.String("[email protected]"),
* },
* SoftwareConfig: ¬ebooks.RuntimeSoftwareConfigArgs{
* Kernels: notebooks.RuntimeSoftwareConfigKernelArray{
* ¬ebooks.RuntimeSoftwareConfigKernelArgs{
* Repository: pulumi.String("gcr.io/deeplearning-platform-release/base-cpu"),
* Tag: pulumi.String("latest"),
* },
* },
* },
* VirtualMachine: ¬ebooks.RuntimeVirtualMachineArgs{
* VirtualMachineConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigArgs{
* MachineType: pulumi.String("n1-standard-4"),
* DataDisk: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs{
* InitializeParams: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs{
* DiskSizeGb: pulumi.Int(100),
* DiskType: pulumi.String("PD_STANDARD"),
* },
* },
* },
* },
* Labels: pulumi.StringMap{
* "k": pulumi.String("val"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.notebooks.Runtime;
* import com.pulumi.gcp.notebooks.RuntimeArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeAccessConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeSoftwareConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var runtimeContainer = new Runtime("runtimeContainer", RuntimeArgs.builder()
* .name("notebooks-runtime-kernel")
* .location("us-central1")
* .accessConfig(RuntimeAccessConfigArgs.builder()
* .accessType("SINGLE_USER")
* .runtimeOwner("[email protected]")
* .build())
* .softwareConfig(RuntimeSoftwareConfigArgs.builder()
* .kernels(RuntimeSoftwareConfigKernelArgs.builder()
* .repository("gcr.io/deeplearning-platform-release/base-cpu")
* .tag("latest")
* .build())
* .build())
* .virtualMachine(RuntimeVirtualMachineArgs.builder()
* .virtualMachineConfig(RuntimeVirtualMachineVirtualMachineConfigArgs.builder()
* .machineType("n1-standard-4")
* .dataDisk(RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs.builder()
* .initializeParams(RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs.builder()
* .diskSizeGb("100")
* .diskType("PD_STANDARD")
* .build())
* .build())
* .build())
* .build())
* .labels(Map.of("k", "val"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* runtimeContainer:
* type: gcp:notebooks:Runtime
* name: runtime_container
* properties:
* name: notebooks-runtime-kernel
* location: us-central1
* accessConfig:
* accessType: SINGLE_USER
* runtimeOwner: [email protected]
* softwareConfig:
* kernels:
* - repository: gcr.io/deeplearning-platform-release/base-cpu
* tag: latest
* virtualMachine:
* virtualMachineConfig:
* machineType: n1-standard-4
* dataDisk:
* initializeParams:
* diskSizeGb: '100'
* diskType: PD_STANDARD
* labels:
* k: val
* ```
*
* ### Notebook Runtime Script
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const runtimeContainer = new gcp.notebooks.Runtime("runtime_container", {
* name: "notebooks-runtime-script",
* location: "us-central1",
* accessConfig: {
* accessType: "SINGLE_USER",
* runtimeOwner: "[email protected]",
* },
* softwareConfig: {
* postStartupScriptBehavior: "RUN_EVERY_START",
* },
* virtualMachine: {
* virtualMachineConfig: {
* machineType: "n1-standard-4",
* dataDisk: {
* initializeParams: {
* diskSizeGb: 100,
* diskType: "PD_STANDARD",
* },
* },
* },
* },
* labels: {
* k: "val",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* runtime_container = gcp.notebooks.Runtime("runtime_container",
* name="notebooks-runtime-script",
* location="us-central1",
* access_config=gcp.notebooks.RuntimeAccessConfigArgs(
* access_type="SINGLE_USER",
* runtime_owner="[email protected]",
* ),
* software_config=gcp.notebooks.RuntimeSoftwareConfigArgs(
* post_startup_script_behavior="RUN_EVERY_START",
* ),
* virtual_machine=gcp.notebooks.RuntimeVirtualMachineArgs(
* virtual_machine_config=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigArgs(
* machine_type="n1-standard-4",
* data_disk=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs(
* initialize_params=gcp.notebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs(
* disk_size_gb=100,
* disk_type="PD_STANDARD",
* ),
* ),
* ),
* ),
* labels={
* "k": "val",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var runtimeContainer = new Gcp.Notebooks.Runtime("runtime_container", new()
* {
* Name = "notebooks-runtime-script",
* Location = "us-central1",
* AccessConfig = new Gcp.Notebooks.Inputs.RuntimeAccessConfigArgs
* {
* AccessType = "SINGLE_USER",
* RuntimeOwner = "[email protected]",
* },
* SoftwareConfig = new Gcp.Notebooks.Inputs.RuntimeSoftwareConfigArgs
* {
* PostStartupScriptBehavior = "RUN_EVERY_START",
* },
* VirtualMachine = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineArgs
* {
* VirtualMachineConfig = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigArgs
* {
* MachineType = "n1-standard-4",
* DataDisk = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs
* {
* InitializeParams = new Gcp.Notebooks.Inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs
* {
* DiskSizeGb = 100,
* DiskType = "PD_STANDARD",
* },
* },
* },
* },
* Labels =
* {
* { "k", "val" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := notebooks.NewRuntime(ctx, "runtime_container", ¬ebooks.RuntimeArgs{
* Name: pulumi.String("notebooks-runtime-script"),
* Location: pulumi.String("us-central1"),
* AccessConfig: ¬ebooks.RuntimeAccessConfigArgs{
* AccessType: pulumi.String("SINGLE_USER"),
* RuntimeOwner: pulumi.String("[email protected]"),
* },
* SoftwareConfig: ¬ebooks.RuntimeSoftwareConfigArgs{
* PostStartupScriptBehavior: pulumi.String("RUN_EVERY_START"),
* },
* VirtualMachine: ¬ebooks.RuntimeVirtualMachineArgs{
* VirtualMachineConfig: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigArgs{
* MachineType: pulumi.String("n1-standard-4"),
* DataDisk: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs{
* InitializeParams: ¬ebooks.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs{
* DiskSizeGb: pulumi.Int(100),
* DiskType: pulumi.String("PD_STANDARD"),
* },
* },
* },
* },
* Labels: pulumi.StringMap{
* "k": pulumi.String("val"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.notebooks.Runtime;
* import com.pulumi.gcp.notebooks.RuntimeArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeAccessConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeSoftwareConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs;
* import com.pulumi.gcp.notebooks.inputs.RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var runtimeContainer = new Runtime("runtimeContainer", RuntimeArgs.builder()
* .name("notebooks-runtime-script")
* .location("us-central1")
* .accessConfig(RuntimeAccessConfigArgs.builder()
* .accessType("SINGLE_USER")
* .runtimeOwner("[email protected]")
* .build())
* .softwareConfig(RuntimeSoftwareConfigArgs.builder()
* .postStartupScriptBehavior("RUN_EVERY_START")
* .build())
* .virtualMachine(RuntimeVirtualMachineArgs.builder()
* .virtualMachineConfig(RuntimeVirtualMachineVirtualMachineConfigArgs.builder()
* .machineType("n1-standard-4")
* .dataDisk(RuntimeVirtualMachineVirtualMachineConfigDataDiskArgs.builder()
* .initializeParams(RuntimeVirtualMachineVirtualMachineConfigDataDiskInitializeParamsArgs.builder()
* .diskSizeGb("100")
* .diskType("PD_STANDARD")
* .build())
* .build())
* .build())
* .build())
* .labels(Map.of("k", "val"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* runtimeContainer:
* type: gcp:notebooks:Runtime
* name: runtime_container
* properties:
* name: notebooks-runtime-script
* location: us-central1
* accessConfig:
* accessType: SINGLE_USER
* runtimeOwner: [email protected]
* softwareConfig:
* postStartupScriptBehavior: RUN_EVERY_START
* virtualMachine:
* virtualMachineConfig:
* machineType: n1-standard-4
* dataDisk:
* initializeParams:
* diskSizeGb: '100'
* diskType: PD_STANDARD
* labels:
* k: val
* ```
*
* ## Import
* Runtime can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/runtimes/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, Runtime can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:notebooks/runtime:Runtime default projects/{{project}}/locations/{{location}}/runtimes/{{name}}
* ```
* ```sh
* $ pulumi import gcp:notebooks/runtime:Runtime default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:notebooks/runtime:Runtime default {{location}}/{{name}}
* ```
* @property accessConfig The config settings for accessing runtime.
* Structure is documented below.
* @property labels The labels to associate with this runtime. Label **keys** must
* contain 1 to 63 characters, and must conform to [RFC 1035]
* (https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be
* empty, but, if present, must contain 1 to 63 characters, and must
* conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No
* more than 32 labels can be associated with a cluster.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
* @property location A reference to the zone where the machine resides.
* - - -
* @property name The name specified for the Notebook runtime.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property softwareConfig The config settings for software inside the runtime.
* Structure is documented below.
* @property virtualMachine Use a Compute Engine VM image to start the managed notebook instance.
* Structure is documented below.
*/
public data class RuntimeArgs(
public val accessConfig: Output? = null,
public val labels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy