InstanceArgs

data class InstanceArgs(val capacityGib: Output<String>? = null, val description: Output<String>? = null, val filesystem: Output<String>? = null, val gkeSupportEnabled: Output<Boolean>? = null, val instanceId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val network: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<InstanceArgs>

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

Constructors

Link copied to clipboard
constructor(capacityGib: Output<String>? = null, description: Output<String>? = null, filesystem: Output<String>? = null, gkeSupportEnabled: Output<Boolean>? = null, instanceId: Output<String>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, network: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val capacityGib: Output<String>? = null

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 description: Output<String>? = null

Optional. A user-readable description of the instance.

Link copied to clipboard
val filesystem: Output<String>? = null

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
val gkeSupportEnabled: Output<Boolean>? = null

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

Link copied to clipboard
val instanceId: Output<String>? = null

Required. The name of the Managed Lustre instance.

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

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>? = null

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 network: Output<String>? = null

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>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): InstanceArgs