1. Packages
  2. Outscale Provider
  3. API Docs
  4. FlexibleGpuLink
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.FlexibleGpuLink

Explore with Pulumi AI

Manages a flexible GPU link.

When linking a flexible GPU to a VM, the VM will automatically be stopped and started again.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

Required resources

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const vm01 = new outscale.Vm("vm01", {
    imageId: "ami-12345678",
    vmType: "tinav5.c1r1p2",
    keypairName: _var.keypair_name,
    placementSubregionName: "eu-west-2a",
});
const flexibleGpu01 = new outscale.FlexibleGpu("flexibleGpu01", {
    modelName: _var.model_name,
    generation: "v4",
    subregionName: "eu-west-2a",
    deleteOnVmDeletion: true,
});
Copy
import pulumi
import pulumi_outscale as outscale

vm01 = outscale.Vm("vm01",
    image_id="ami-12345678",
    vm_type="tinav5.c1r1p2",
    keypair_name=var["keypair_name"],
    placement_subregion_name="eu-west-2a")
flexible_gpu01 = outscale.FlexibleGpu("flexibleGpu01",
    model_name=var["model_name"],
    generation="v4",
    subregion_name="eu-west-2a",
    delete_on_vm_deletion=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewVm(ctx, "vm01", &outscale.VmArgs{
			ImageId:                pulumi.String("ami-12345678"),
			VmType:                 pulumi.String("tinav5.c1r1p2"),
			KeypairName:            pulumi.Any(_var.Keypair_name),
			PlacementSubregionName: pulumi.String("eu-west-2a"),
		})
		if err != nil {
			return err
		}
		_, err = outscale.NewFlexibleGpu(ctx, "flexibleGpu01", &outscale.FlexibleGpuArgs{
			ModelName:          pulumi.Any(_var.Model_name),
			Generation:         pulumi.String("v4"),
			SubregionName:      pulumi.String("eu-west-2a"),
			DeleteOnVmDeletion: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var vm01 = new Outscale.Vm("vm01", new()
    {
        ImageId = "ami-12345678",
        VmType = "tinav5.c1r1p2",
        KeypairName = @var.Keypair_name,
        PlacementSubregionName = "eu-west-2a",
    });

    var flexibleGpu01 = new Outscale.FlexibleGpu("flexibleGpu01", new()
    {
        ModelName = @var.Model_name,
        Generation = "v4",
        SubregionName = "eu-west-2a",
        DeleteOnVmDeletion = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.Vm;
import com.pulumi.outscale.VmArgs;
import com.pulumi.outscale.FlexibleGpu;
import com.pulumi.outscale.FlexibleGpuArgs;
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 vm01 = new Vm("vm01", VmArgs.builder()
            .imageId("ami-12345678")
            .vmType("tinav5.c1r1p2")
            .keypairName(var_.keypair_name())
            .placementSubregionName("eu-west-2a")
            .build());

        var flexibleGpu01 = new FlexibleGpu("flexibleGpu01", FlexibleGpuArgs.builder()
            .modelName(var_.model_name())
            .generation("v4")
            .subregionName("eu-west-2a")
            .deleteOnVmDeletion(true)
            .build());

    }
}
Copy
resources:
  vm01:
    type: outscale:Vm
    properties:
      imageId: ami-12345678
      vmType: tinav5.c1r1p2
      keypairName: ${var.keypair_name}
      placementSubregionName: eu-west-2a
  flexibleGpu01:
    type: outscale:FlexibleGpu
    properties:
      modelName: ${var.model_name}
      generation: v4
      subregionName: eu-west-2a
      deleteOnVmDeletion: true
Copy
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const linkFgpu01 = new outscale.FlexibleGpuLink("linkFgpu01", {
    flexibleGpuIds: [outscale_flexible_gpu.flexible_gpu01.flexible_gpu_id],
    vmId: outscale_vm.vm01.vm_id,
});
Copy
import pulumi
import pulumi_outscale as outscale

link_fgpu01 = outscale.FlexibleGpuLink("linkFgpu01",
    flexible_gpu_ids=[outscale_flexible_gpu["flexible_gpu01"]["flexible_gpu_id"]],
    vm_id=outscale_vm["vm01"]["vm_id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewFlexibleGpuLink(ctx, "linkFgpu01", &outscale.FlexibleGpuLinkArgs{
			FlexibleGpuIds: pulumi.StringArray{
				outscale_flexible_gpu.Flexible_gpu01.Flexible_gpu_id,
			},
			VmId: pulumi.Any(outscale_vm.Vm01.Vm_id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var linkFgpu01 = new Outscale.FlexibleGpuLink("linkFgpu01", new()
    {
        FlexibleGpuIds = new[]
        {
            outscale_flexible_gpu.Flexible_gpu01.Flexible_gpu_id,
        },
        VmId = outscale_vm.Vm01.Vm_id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.FlexibleGpuLink;
import com.pulumi.outscale.FlexibleGpuLinkArgs;
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 linkFgpu01 = new FlexibleGpuLink("linkFgpu01", FlexibleGpuLinkArgs.builder()
            .flexibleGpuIds(outscale_flexible_gpu.flexible_gpu01().flexible_gpu_id())
            .vmId(outscale_vm.vm01().vm_id())
            .build());

    }
}
Copy
resources:
  linkFgpu01:
    type: outscale:FlexibleGpuLink
    properties:
      flexibleGpuIds:
        - ${outscale_flexible_gpu.flexible_gpu01.flexible_gpu_id}
      vmId: ${outscale_vm.vm01.vm_id}
Copy

Create FlexibleGpuLink Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FlexibleGpuLink(name: string, args: FlexibleGpuLinkArgs, opts?: CustomResourceOptions);
@overload
def FlexibleGpuLink(resource_name: str,
                    args: FlexibleGpuLinkArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def FlexibleGpuLink(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    flexible_gpu_ids: Optional[Sequence[str]] = None,
                    vm_id: Optional[str] = None,
                    flexible_gpu_link_id: Optional[str] = None,
                    timeouts: Optional[FlexibleGpuLinkTimeoutsArgs] = None)
func NewFlexibleGpuLink(ctx *Context, name string, args FlexibleGpuLinkArgs, opts ...ResourceOption) (*FlexibleGpuLink, error)
public FlexibleGpuLink(string name, FlexibleGpuLinkArgs args, CustomResourceOptions? opts = null)
public FlexibleGpuLink(String name, FlexibleGpuLinkArgs args)
public FlexibleGpuLink(String name, FlexibleGpuLinkArgs args, CustomResourceOptions options)
type: outscale:FlexibleGpuLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var flexibleGpuLinkResource = new Outscale.FlexibleGpuLink("flexibleGpuLinkResource", new()
{
    FlexibleGpuIds = new[]
    {
        "string",
    },
    VmId = "string",
    FlexibleGpuLinkId = "string",
    Timeouts = new Outscale.Inputs.FlexibleGpuLinkTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
Copy
example, err := outscale.NewFlexibleGpuLink(ctx, "flexibleGpuLinkResource", &outscale.FlexibleGpuLinkArgs{
FlexibleGpuIds: pulumi.StringArray{
pulumi.String("string"),
},
VmId: pulumi.String("string"),
FlexibleGpuLinkId: pulumi.String("string"),
Timeouts: &.FlexibleGpuLinkTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var flexibleGpuLinkResource = new FlexibleGpuLink("flexibleGpuLinkResource", FlexibleGpuLinkArgs.builder()
    .flexibleGpuIds("string")
    .vmId("string")
    .flexibleGpuLinkId("string")
    .timeouts(FlexibleGpuLinkTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
Copy
flexible_gpu_link_resource = outscale.FlexibleGpuLink("flexibleGpuLinkResource",
    flexible_gpu_ids=["string"],
    vm_id="string",
    flexible_gpu_link_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
Copy
const flexibleGpuLinkResource = new outscale.FlexibleGpuLink("flexibleGpuLinkResource", {
    flexibleGpuIds: ["string"],
    vmId: "string",
    flexibleGpuLinkId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
Copy
type: outscale:FlexibleGpuLink
properties:
    flexibleGpuIds:
        - string
    flexibleGpuLinkId: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
    vmId: string
Copy

FlexibleGpuLink Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FlexibleGpuLink resource accepts the following input properties:

FlexibleGpuIds This property is required. List<string>
(Required) The ID of one or more fGPUs you want to attach.
VmId This property is required. string
The ID of the VM you want to attach the fGPU to.
FlexibleGpuLinkId string
Timeouts FlexibleGpuLinkTimeouts
FlexibleGpuIds This property is required. []string
(Required) The ID of one or more fGPUs you want to attach.
VmId This property is required. string
The ID of the VM you want to attach the fGPU to.
FlexibleGpuLinkId string
Timeouts FlexibleGpuLinkTimeoutsArgs
flexibleGpuIds This property is required. List<String>
(Required) The ID of one or more fGPUs you want to attach.
vmId This property is required. String
The ID of the VM you want to attach the fGPU to.
flexibleGpuLinkId String
timeouts FlexibleGpuLinkTimeouts
flexibleGpuIds This property is required. string[]
(Required) The ID of one or more fGPUs you want to attach.
vmId This property is required. string
The ID of the VM you want to attach the fGPU to.
flexibleGpuLinkId string
timeouts FlexibleGpuLinkTimeouts
flexible_gpu_ids This property is required. Sequence[str]
(Required) The ID of one or more fGPUs you want to attach.
vm_id This property is required. str
The ID of the VM you want to attach the fGPU to.
flexible_gpu_link_id str
timeouts FlexibleGpuLinkTimeoutsArgs
flexibleGpuIds This property is required. List<String>
(Required) The ID of one or more fGPUs you want to attach.
vmId This property is required. String
The ID of the VM you want to attach the fGPU to.
flexibleGpuLinkId String
timeouts Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RequestId string
Id string
The provider-assigned unique ID for this managed resource.
RequestId string
id String
The provider-assigned unique ID for this managed resource.
requestId String
id string
The provider-assigned unique ID for this managed resource.
requestId string
id str
The provider-assigned unique ID for this managed resource.
request_id str
id String
The provider-assigned unique ID for this managed resource.
requestId String

Look up Existing FlexibleGpuLink Resource

Get an existing FlexibleGpuLink 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?: FlexibleGpuLinkState, opts?: CustomResourceOptions): FlexibleGpuLink
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        flexible_gpu_ids: Optional[Sequence[str]] = None,
        flexible_gpu_link_id: Optional[str] = None,
        request_id: Optional[str] = None,
        timeouts: Optional[FlexibleGpuLinkTimeoutsArgs] = None,
        vm_id: Optional[str] = None) -> FlexibleGpuLink
func GetFlexibleGpuLink(ctx *Context, name string, id IDInput, state *FlexibleGpuLinkState, opts ...ResourceOption) (*FlexibleGpuLink, error)
public static FlexibleGpuLink Get(string name, Input<string> id, FlexibleGpuLinkState? state, CustomResourceOptions? opts = null)
public static FlexibleGpuLink get(String name, Output<String> id, FlexibleGpuLinkState state, CustomResourceOptions options)
resources:  _:    type: outscale:FlexibleGpuLink    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
FlexibleGpuIds List<string>
(Required) The ID of one or more fGPUs you want to attach.
FlexibleGpuLinkId string
RequestId string
Timeouts FlexibleGpuLinkTimeouts
VmId string
The ID of the VM you want to attach the fGPU to.
FlexibleGpuIds []string
(Required) The ID of one or more fGPUs you want to attach.
FlexibleGpuLinkId string
RequestId string
Timeouts FlexibleGpuLinkTimeoutsArgs
VmId string
The ID of the VM you want to attach the fGPU to.
flexibleGpuIds List<String>
(Required) The ID of one or more fGPUs you want to attach.
flexibleGpuLinkId String
requestId String
timeouts FlexibleGpuLinkTimeouts
vmId String
The ID of the VM you want to attach the fGPU to.
flexibleGpuIds string[]
(Required) The ID of one or more fGPUs you want to attach.
flexibleGpuLinkId string
requestId string
timeouts FlexibleGpuLinkTimeouts
vmId string
The ID of the VM you want to attach the fGPU to.
flexible_gpu_ids Sequence[str]
(Required) The ID of one or more fGPUs you want to attach.
flexible_gpu_link_id str
request_id str
timeouts FlexibleGpuLinkTimeoutsArgs
vm_id str
The ID of the VM you want to attach the fGPU to.
flexibleGpuIds List<String>
(Required) The ID of one or more fGPUs you want to attach.
flexibleGpuLinkId String
requestId String
timeouts Property Map
vmId String
The ID of the VM you want to attach the fGPU to.

Supporting Types

FlexibleGpuLinkTimeouts
, FlexibleGpuLinkTimeoutsArgs

Create string
Delete string
Read string
Update string
Create string
Delete string
Read string
Update string
create String
delete String
read String
update String
create string
delete string
read string
update string
create str
delete str
read str
update str
create String
delete String
read String
update String

Import

A flexible GPU link can be imported using the flexible GPU ID. For example:

console

$ pulumi import outscale:index/flexibleGpuLink:FlexibleGpuLink imported_link_fgpu fgpu-12345678
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.