gcp.notebooks.Environment
Explore with Pulumi AI
A Cloud AI Platform Notebook environment.
To get more information about Environment, see:
- API documentation
- How-to Guides
Example Usage
Notebook Environment Basic
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()
{
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/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{
ContainerImage: ¬ebooks.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.
- Container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- Description string
A brief description of this environment.
- Display
Name 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}
- Post
Startup stringScript 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.
- Vm
Image EnvironmentVm Image 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.
- Container
Image EnvironmentContainer Image Args Use a container image to start the notebook instance. Structure is documented below.
- Description string
A brief description of this environment.
- Display
Name 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}
- Post
Startup stringScript 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.
- Vm
Image EnvironmentVm Image Args 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.
- container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- description String
A brief description of this environment.
- display
Name 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}
- post
Startup StringScript 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.
- vm
Image EnvironmentVm Image 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.
- container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- description string
A brief description of this environment.
- display
Name 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}
- post
Startup stringScript 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.
- vm
Image EnvironmentVm Image 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 EnvironmentContainer Image Args 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_ strscript 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 EnvironmentVm Image Args 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.
- container
Image Property Map Use a container image to start the notebook instance. Structure is documented below.
- description String
A brief description of this environment.
- display
Name 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}
- post
Startup StringScript 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.
- vm
Image 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:
- Create
Time string Instance creation time
- Id string
The provider-assigned unique ID for this managed resource.
- Create
Time string Instance creation time
- Id string
The provider-assigned unique ID for this managed resource.
- create
Time String Instance creation time
- id String
The provider-assigned unique ID for this managed resource.
- create
Time 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.
- create
Time 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.
- Container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- Create
Time string Instance creation time
- Description string
A brief description of this environment.
- Display
Name 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}
- Post
Startup stringScript 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.
- Vm
Image EnvironmentVm Image Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
- Container
Image EnvironmentContainer Image Args Use a container image to start the notebook instance. Structure is documented below.
- Create
Time string Instance creation time
- Description string
A brief description of this environment.
- Display
Name 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}
- Post
Startup stringScript 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.
- Vm
Image EnvironmentVm Image Args Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
- container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- create
Time String Instance creation time
- description String
A brief description of this environment.
- display
Name 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}
- post
Startup StringScript 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.
- vm
Image EnvironmentVm Image Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
- container
Image EnvironmentContainer Image Use a container image to start the notebook instance. Structure is documented below.
- create
Time string Instance creation time
- description string
A brief description of this environment.
- display
Name 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}
- post
Startup stringScript 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.
- vm
Image EnvironmentVm Image Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
- container_
image EnvironmentContainer Image Args 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_ strscript 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 EnvironmentVm Image Args Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
- container
Image Property Map Use a container image to start the notebook instance. Structure is documented below.
- create
Time String Instance creation time
- description String
A brief description of this environment.
- display
Name 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}
- post
Startup StringScript 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.
- vm
Image Property Map Use a Compute Engine VM image to start the notebook instance. Structure is documented below.
Supporting Types
EnvironmentContainerImage, EnvironmentContainerImageArgs
- 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, EnvironmentVmImageArgs
- Project string
The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}
- Image
Family string Use this VM image family to find the image; the newest image in this family will be used.
- Image
Name 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}
- Image
Family string Use this VM image family to find the image; the newest image in this family will be used.
- Image
Name 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}
- image
Family String Use this VM image family to find the image; the newest image in this family will be used.
- image
Name 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}
- image
Family string Use this VM image family to find the image; the newest image in this family will be used.
- image
Name 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}
- image
Family String Use this VM image family to find the image; the newest image in this family will be used.
- image
Name String Use VM image name to find the image.
Import
Environment can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/environments/{{name}}
* {{project}}/{{location}}/{{name}}
* {{location}}/{{name}}
In Terraform v1.5.0 and later, use an import
block to import Environment using one of the formats above. For exampletf import {
id = “projects/{{project}}/locations/{{location}}/environments/{{name}}”
to = google_notebooks_environment.default }
$ pulumi import gcp:notebooks/environment:Environment When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}}
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.