Instance

class Instance : KotlinCustomResource

A Managed Lustre instance

Example Usage

Lustre Instance Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
// This example assumes this network already exists.
// The API creates a tenant network per network authorized for a
// Lustre instance and that network is not deleted when the user-created
// network (authorized_network) is deleted, so this prevents issues
// with tenant network quota.
// If this network hasn't been created and you are using this example in your
// config, add an additional network resource or change
// this from "data"to "resource"
const lustre_network = gcp.compute.getNetwork({
name: "my-network",
});
const instance = new gcp.lustre.Instance("instance", {
instanceId: "my-instance",
location: "us-central1-a",
description: "test lustre instance",
filesystem: "testfs",
capacityGib: "18000",
network: lustre_network.then(lustre_network => lustre_network.id),
labels: {
test: "value",
},
});
import pulumi
import pulumi_gcp as gcp
# This example assumes this network already exists.
# The API creates a tenant network per network authorized for a
# Lustre instance and that network is not deleted when the user-created
# network (authorized_network) is deleted, so this prevents issues
# with tenant network quota.
# If this network hasn't been created and you are using this example in your
# config, add an additional network resource or change
# this from "data"to "resource"
lustre_network = gcp.compute.get_network(name="my-network")
instance = gcp.lustre.Instance("instance",
instance_id="my-instance",
location="us-central1-a",
description="test lustre instance",
filesystem="testfs",
capacity_gib="18000",
network=lustre_network.id,
labels={
"test": "value",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
// This example assumes this network already exists.
// The API creates a tenant network per network authorized for a
// Lustre instance and that network is not deleted when the user-created
// network (authorized_network) is deleted, so this prevents issues
// with tenant network quota.
// If this network hasn't been created and you are using this example in your
// config, add an additional network resource or change
// this from "data"to "resource"
var lustre_network = Gcp.Compute.GetNetwork.Invoke(new()
{
Name = "my-network",
});
var instance = new Gcp.Lustre.Instance("instance", new()
{
InstanceId = "my-instance",
Location = "us-central1-a",
Description = "test lustre instance",
Filesystem = "testfs",
CapacityGib = "18000",
Network = lustre_network.Apply(lustre_network => lustre_network.Apply(getNetworkResult => getNetworkResult.Id)),
Labels =
{
{ "test", "value" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/lustre"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// This example assumes this network already exists.
// The API creates a tenant network per network authorized for a
// Lustre instance and that network is not deleted when the user-created
// network (authorized_network) is deleted, so this prevents issues
// with tenant network quota.
// If this network hasn't been created and you are using this example in your
// config, add an additional network resource or change
// this from "data"to "resource"
lustre_network, err := compute.LookupNetwork(ctx, &compute.LookupNetworkArgs{
Name: "my-network",
}, nil)
if err != nil {
return err
}
_, err = lustre.NewInstance(ctx, "instance", &lustre.InstanceArgs{
InstanceId: pulumi.String("my-instance"),
Location: pulumi.String("us-central1-a"),
Description: pulumi.String("test lustre instance"),
Filesystem: pulumi.String("testfs"),
CapacityGib: pulumi.String("18000"),
Network: pulumi.String(lustre_network.Id),
Labels: pulumi.StringMap{
"test": pulumi.String("value"),
},
})
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.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkArgs;
import com.pulumi.gcp.lustre.Instance;
import com.pulumi.gcp.lustre.InstanceArgs;
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) {
// This example assumes this network already exists.
// The API creates a tenant network per network authorized for a
// Lustre instance and that network is not deleted when the user-created
// network (authorized_network) is deleted, so this prevents issues
// with tenant network quota.
// If this network hasn't been created and you are using this example in your
// config, add an additional network resource or change
// this from "data"to "resource"
final var lustre-network = ComputeFunctions.getNetwork(GetNetworkArgs.builder()
.name("my-network")
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.instanceId("my-instance")
.location("us-central1-a")
.description("test lustre instance")
.filesystem("testfs")
.capacityGib("18000")
.network(lustre_network.id())
.labels(Map.of("test", "value"))
.build());
}
}
resources:
instance:
type: gcp:lustre:Instance
properties:
instanceId: my-instance
location: us-central1-a
description: test lustre instance
filesystem: testfs
capacityGib: 18000
network: ${["lustre-network"].id}
labels:
test: value
variables:
# This example assumes this network already exists.
# // The API creates a tenant network per network authorized for a
# // Lustre instance and that network is not deleted when the user-created
# // network (authorized_network) is deleted, so this prevents issues
# // with tenant network quota.
# // If this network hasn't been created and you are using this example in your
# // config, add an additional network resource or change
# // this from "data"to "resource"
lustre-network:
fn::invoke:
function: gcp:compute:getNetwork
arguments:
name: my-network

Import

Instance can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/instances/{{instance_id}}

  • {{project}}/{{location}}/{{instance_id}}

  • {{location}}/{{instance_id}} When using the pulumi import command, Instance can be imported using one of the formats above. For example:

$ pulumi import gcp:lustre/instance:Instance default projects/{{project}}/locations/{{location}}/instances/{{instance_id}}
$ pulumi import gcp:lustre/instance:Instance default {{project}}/{{location}}/{{instance_id}}
$ pulumi import gcp:lustre/instance:Instance default {{location}}/{{instance_id}}

Properties

Link copied to clipboard
val capacityGib: Output<String>

Required. The storage capacity of the instance in gibibytes (GiB). Allowed values are from 18000 to 954000, in increments of 9000.

Link copied to clipboard
val createTime: Output<String>

Output only. Timestamp when the instance was created.

Link copied to clipboard
val description: Output<String>?

Optional. A user-readable description of the instance.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard
val filesystem: Output<String>

Required. Immutable. The filesystem name for this instance. This name is used by client-side tools, including when mounting the instance. Must be 8 characters or less and may only contain letters and numbers.

Link copied to clipboard

Optional. Indicates whether you want to enable support for GKE clients. By default, GKE clients are not supported.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

Required. The name of the Managed Lustre instance.

Link copied to clipboard
val labels: Output<Map<String, String>>?

Optional. Labels as key value pairs. 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.

Link copied to clipboard
val location: Output<String>

Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.

Link copied to clipboard
val mountPoint: Output<String>

Output only. Mount point of the instance in the format IP_ADDRESS@tcp:/FILESYSTEM.

Link copied to clipboard
val name: Output<String>

Identifier. The name of the instance.

Link copied to clipboard
val network: Output<String>

Required. Immutable. The full name of the VPC network to which the instance is connected. Must be in the format projects/{project_id}/global/networks/{network_name}.

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

Output only. The state of the instance. Possible values: STATE_UNSPECIFIED ACTIVE CREATING DELETING UPGRADING REPAIRING STOPPED

Link copied to clipboard
val updateTime: Output<String>

Output only. Timestamp when the instance was last updated.

Link copied to clipboard
val urn: Output<String>