gcp logo
Google Cloud Classic v6.52.0, Mar 22 23

gcp.notebooks.Environment

A Cloud AI Platform Notebook environment.

To get more information about Environment, see:

Example Usage

Notebook Environment Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var environment = new Gcp.Notebooks.Environment("environment", new()
    {
        ContainerImage = new Gcp.Notebooks.Inputs.EnvironmentContainerImageArgs
        {
            Repository = "gcr.io/deeplearning-platform-release/base-cpu",
        },
        Location = "us-west1-a",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/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", &notebooks.EnvironmentArgs{
			ContainerImage: &notebooks.EnvironmentContainerImageArgs{
				Repository: pulumi.String("gcr.io/deeplearning-platform-release/base-cpu"),
			},
			Location: pulumi.String("us-west1-a"),
		})
		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()        
            .containerImage(EnvironmentContainerImageArgs.builder()
                .repository("gcr.io/deeplearning-platform-release/base-cpu")
                .build())
            .location("us-west1-a")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

environment = gcp.notebooks.Environment("environment",
    container_image=gcp.notebooks.EnvironmentContainerImageArgs(
        repository="gcr.io/deeplearning-platform-release/base-cpu",
    ),
    location="us-west1-a")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const environment = new gcp.notebooks.Environment("environment", {
    containerImage: {
        repository: "gcr.io/deeplearning-platform-release/base-cpu",
    },
    location: "us-west1-a",
});
resources:
  environment:
    type: gcp:notebooks:Environment
    properties:
      containerImage:
        repository: gcr.io/deeplearning-platform-release/base-cpu
      location: us-west1-a

Create Environment Resource

new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
@overload
def Environment(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                container_image: Optional[EnvironmentContainerImageArgs] = None,
                description: Optional[str] = None,
                display_name: Optional[str] = None,
                location: Optional[str] = None,
                name: Optional[str] = None,
                post_startup_script: Optional[str] = None,
                project: Optional[str] = None,
                vm_image: Optional[EnvironmentVmImageArgs] = None)
@overload
def Environment(resource_name: str,
                args: EnvironmentArgs,
                opts: Optional[ResourceOptions] = None)
func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: gcp:notebooks:Environment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Environment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Environment resource accepts the following input properties:

Location string

A reference to the zone where the machine resides.

ContainerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

Description string

A brief description of this environment.

DisplayName string

Display name of this environment for the UI.

Name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

PostStartupScript string

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"

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

VmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

Location string

A reference to the zone where the machine resides.

ContainerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

Description string

A brief description of this environment.

DisplayName string

Display name of this environment for the UI.

Name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

PostStartupScript string

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"

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

VmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

location String

A reference to the zone where the machine resides.

containerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

description String

A brief description of this environment.

displayName String

Display name of this environment for the UI.

name String

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript String

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"

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

location string

A reference to the zone where the machine resides.

containerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

description string

A brief description of this environment.

displayName string

Display name of this environment for the UI.

name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript string

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"

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

location str

A reference to the zone where the machine resides.

container_image EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

description str

A brief description of this environment.

display_name str

Display name of this environment for the UI.

name str

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

post_startup_script str

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"

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vm_image EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

location String

A reference to the zone where the machine resides.

containerImage Property Map

Use a container image to start the notebook instance. Structure is documented below.

description String

A brief description of this environment.

displayName String

Display name of this environment for the UI.

name String

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript String

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"

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage Property Map

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:

CreateTime string

Instance creation time

Id string

The provider-assigned unique ID for this managed resource.

CreateTime string

Instance creation time

Id string

The provider-assigned unique ID for this managed resource.

createTime String

Instance creation time

id String

The provider-assigned unique ID for this managed resource.

createTime string

Instance creation time

id string

The provider-assigned unique ID for this managed resource.

create_time str

Instance creation time

id str

The provider-assigned unique ID for this managed resource.

createTime String

Instance creation time

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Environment Resource

Get an existing Environment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EnvironmentState, opts?: CustomResourceOptions): Environment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        container_image: Optional[EnvironmentContainerImageArgs] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        post_startup_script: Optional[str] = None,
        project: Optional[str] = None,
        vm_image: Optional[EnvironmentVmImageArgs] = None) -> Environment
func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ContainerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

CreateTime string

Instance creation time

Description string

A brief description of this environment.

DisplayName string

Display name of this environment for the UI.

Location string

A reference to the zone where the machine resides.

Name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

PostStartupScript string

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"

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

VmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

ContainerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

CreateTime string

Instance creation time

Description string

A brief description of this environment.

DisplayName string

Display name of this environment for the UI.

Location string

A reference to the zone where the machine resides.

Name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

PostStartupScript string

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"

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

VmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

containerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

createTime String

Instance creation time

description String

A brief description of this environment.

displayName String

Display name of this environment for the UI.

location String

A reference to the zone where the machine resides.

name String

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript String

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"

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

containerImage EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

createTime string

Instance creation time

description string

A brief description of this environment.

displayName string

Display name of this environment for the UI.

location string

A reference to the zone where the machine resides.

name string

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript string

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"

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

container_image EnvironmentContainerImageArgs

Use a container image to start the notebook instance. Structure is documented below.

create_time str

Instance creation time

description str

A brief description of this environment.

display_name str

Display name of this environment for the UI.

location str

A reference to the zone where the machine resides.

name str

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

post_startup_script str

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"

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vm_image EnvironmentVmImageArgs

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

containerImage Property Map

Use a container image to start the notebook instance. Structure is documented below.

createTime String

Instance creation time

description String

A brief description of this environment.

displayName String

Display name of this environment for the UI.

location String

A reference to the zone where the machine resides.

name String

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

postStartupScript String

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"

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

vmImage Property Map

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

Supporting Types

EnvironmentContainerImage

Repository string

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

Tag string

The tag of the container image. If not specified, this defaults to the latest tag.

Repository string

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

Tag string

The tag of the container image. If not specified, this defaults to the latest tag.

repository String

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

tag String

The tag of the container image. If not specified, this defaults to the latest tag.

repository string

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

tag string

The tag of the container image. If not specified, this defaults to the latest tag.

repository str

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

tag str

The tag of the container image. If not specified, this defaults to the latest tag.

repository String

The path to the container image repository. For example: gcr.io/{project_id}/{imageName}

tag String

The tag of the container image. If not specified, this defaults to the latest tag.

EnvironmentVmImage

Project string

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

ImageFamily string

Use this VM image family to find the image; the newest image in this family will be used.

ImageName string

Use VM image name to find the image.

Project string

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

ImageFamily string

Use this VM image family to find the image; the newest image in this family will be used.

ImageName string

Use VM image name to find the image.

project String

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

imageFamily String

Use this VM image family to find the image; the newest image in this family will be used.

imageName String

Use VM image name to find the image.

project string

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

imageFamily string

Use this VM image family to find the image; the newest image in this family will be used.

imageName string

Use VM image name to find the image.

project str

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

image_family str

Use this VM image family to find the image; the newest image in this family will be used.

image_name str

Use VM image name to find the image.

project String

The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

imageFamily String

Use this VM image family to find the image; the newest image in this family will be used.

imageName String

Use VM image name to find the image.

Import

Environment can be imported using any of these accepted formats

 $ 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}}

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.