Environment Args
A Cloud AI Platform Notebook environment. To get more information about Environment, see:
How-to Guides
Example Usage
Notebook Environment Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const environment = new gcp.notebooks.Environment("environment", {
name: "notebooks-environment",
location: "us-west1-a",
containerImage: {
repository: "gcr.io/deeplearning-platform-release/base-cpu",
},
});
import pulumi
import pulumi_gcp as gcp
environment = gcp.notebooks.Environment("environment",
name="notebooks-environment",
location="us-west1-a",
container_image={
"repository": "gcr.io/deeplearning-platform-release/base-cpu",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var environment = new Gcp.Notebooks.Environment("environment", new()
{
Name = "notebooks-environment",
Location = "us-west1-a",
ContainerImage = new Gcp.Notebooks.Inputs.EnvironmentContainerImageArgs
{
Repository = "gcr.io/deeplearning-platform-release/base-cpu",
},
});
});
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.NewEnvironment(ctx, "environment", ¬ebooks.EnvironmentArgs{
Name: pulumi.String("notebooks-environment"),
Location: pulumi.String("us-west1-a"),
ContainerImage: ¬ebooks.EnvironmentContainerImageArgs{
Repository: pulumi.String("gcr.io/deeplearning-platform-release/base-cpu"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.notebooks.Environment;
import com.pulumi.gcp.notebooks.EnvironmentArgs;
import com.pulumi.gcp.notebooks.inputs.EnvironmentContainerImageArgs;
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 environment = new Environment("environment", EnvironmentArgs.builder()
.name("notebooks-environment")
.location("us-west1-a")
.containerImage(EnvironmentContainerImageArgs.builder()
.repository("gcr.io/deeplearning-platform-release/base-cpu")
.build())
.build());
}
}
resources:
environment:
type: gcp:notebooks:Environment
properties:
name: notebooks-environment
location: us-west1-a
containerImage:
repository: gcr.io/deeplearning-platform-release/base-cpu
Import
Environment can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/environments/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using thepulumi import
command, Environment can be imported using one of the formats above. For example:
$ pulumi import gcp:notebooks/environment:Environment default projects/{{project}}/locations/{{location}}/environments/{{name}}
$ pulumi import gcp:notebooks/environment:Environment default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:notebooks/environment:Environment default {{location}}/{{name}}
Constructors
Properties
Use a container image to start the notebook instance. Structure is documented below.
A brief description of this environment.
Display name of this environment for the UI.
Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path. Example: "gs://path-to-file/file-name"
Use a Compute Engine VM image to start the notebook instance. Structure is documented below.