1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ComputeInstanceV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.ComputeInstanceV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for ECS management you can get at documentation portal

    Manages a V2 VM instance resource within OpenTelekomCloud.

    NOTE: Compute v2 API that are used in this resource aren’t officially supported on SwissCloud.

    Example Usage

    Basic Instance

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const basic = new opentelekomcloud.ComputeInstanceV2("basic", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        networks: [{
            name: "my_network",
        }],
        metadata: {
            "this": "that",
        },
        tags: {
            muh: "kuh",
        },
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    basic = opentelekomcloud.ComputeInstanceV2("basic",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        networks=[{
            "name": "my_network",
        }],
        metadata={
            "this": "that",
        },
        tags={
            "muh": "kuh",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "basic", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_network"),
    				},
    			},
    			Metadata: pulumi.StringMap{
    				"this": pulumi.String("that"),
    			},
    			Tags: pulumi.StringMap{
    				"muh": pulumi.String("kuh"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var basic = new Opentelekomcloud.ComputeInstanceV2("basic", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_network",
                },
            },
            Metadata = 
            {
                { "this", "that" },
            },
            Tags = 
            {
                { "muh", "kuh" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            var basic = new ComputeInstanceV2("basic", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name("my_network")
                    .build())
                .metadata(Map.of("this", "that"))
                .tags(Map.of("muh", "kuh"))
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      basic:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          networks:
            - name: my_network
          metadata:
            this: that
          tags:
            muh: kuh
    

    Instance With Attached Volume

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const myvol = new opentelekomcloud.BlockstorageVolumeV2("myvol", {size: 4});
    const myinstance = new opentelekomcloud.ComputeInstanceV2("myinstance", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        networks: [{
            name: "my_network",
        }],
    });
    const attached = new opentelekomcloud.ComputeVolumeAttachV2("attached", {
        instanceId: myinstance.computeInstanceV2Id,
        volumeId: myvol.blockstorageVolumeV2Id,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    myvol = opentelekomcloud.BlockstorageVolumeV2("myvol", size=4)
    myinstance = opentelekomcloud.ComputeInstanceV2("myinstance",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        networks=[{
            "name": "my_network",
        }])
    attached = opentelekomcloud.ComputeVolumeAttachV2("attached",
        instance_id=myinstance.compute_instance_v2_id,
        volume_id=myvol.blockstorage_volume_v2_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		myvol, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "myvol", &opentelekomcloud.BlockstorageVolumeV2Args{
    			Size: pulumi.Float64(4),
    		})
    		if err != nil {
    			return err
    		}
    		myinstance, err := opentelekomcloud.NewComputeInstanceV2(ctx, "myinstance", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_network"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewComputeVolumeAttachV2(ctx, "attached", &opentelekomcloud.ComputeVolumeAttachV2Args{
    			InstanceId: myinstance.ComputeInstanceV2Id,
    			VolumeId:   myvol.BlockstorageVolumeV2Id,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var myvol = new Opentelekomcloud.BlockstorageVolumeV2("myvol", new()
        {
            Size = 4,
        });
    
        var myinstance = new Opentelekomcloud.ComputeInstanceV2("myinstance", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_network",
                },
            },
        });
    
        var attached = new Opentelekomcloud.ComputeVolumeAttachV2("attached", new()
        {
            InstanceId = myinstance.ComputeInstanceV2Id,
            VolumeId = myvol.BlockstorageVolumeV2Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2;
    import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2Args;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            var myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
                .size(4)
                .build());
    
            var myinstance = new ComputeInstanceV2("myinstance", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name("my_network")
                    .build())
                .build());
    
            var attached = new ComputeVolumeAttachV2("attached", ComputeVolumeAttachV2Args.builder()
                .instanceId(myinstance.computeInstanceV2Id())
                .volumeId(myvol.blockstorageVolumeV2Id())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      myvol:
        type: opentelekomcloud:BlockstorageVolumeV2
        properties:
          size: 4
      myinstance:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          networks:
            - name: my_network
      attached:
        type: opentelekomcloud:ComputeVolumeAttachV2
        properties:
          instanceId: ${myinstance.computeInstanceV2Id}
          volumeId: ${myvol.blockstorageVolumeV2Id}
    

    Boot From Volume

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        blockDevices: [{
            uuid: imageId,
            sourceType: "image",
            volumeSize: 5,
            bootIndex: 0,
            destinationType: "volume",
            deleteOnTermination: true,
            volumeType: "SSD",
        }],
        networks: [{
            name: "my_network",
        }],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        block_devices=[{
            "uuid": image_id,
            "source_type": "image",
            "volume_size": 5,
            "boot_index": 0,
            "destination_type": "volume",
            "delete_on_termination": True,
            "volume_type": "SSD",
        }],
        networks=[{
            "name": "my_network",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                pulumi.Any(imageId),
    					SourceType:          pulumi.String("image"),
    					VolumeSize:          pulumi.Float64(5),
    					BootIndex:           pulumi.Float64(0),
    					DestinationType:     pulumi.String("volume"),
    					DeleteOnTermination: pulumi.Bool(true),
    					VolumeType:          pulumi.String("SSD"),
    				},
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_network"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
        {
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = imageId,
                    SourceType = "image",
                    VolumeSize = 5,
                    BootIndex = 0,
                    DestinationType = "volume",
                    DeleteOnTermination = true,
                    VolumeType = "SSD",
                },
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_network",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
                    .uuid(imageId)
                    .sourceType("image")
                    .volumeSize(5)
                    .bootIndex(0)
                    .destinationType("volume")
                    .deleteOnTermination(true)
                    .volumeType("SSD")
                    .build())
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name("my_network")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      boot-from-volume:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          blockDevices:
            - uuid: ${imageId}
              sourceType: image
              volumeSize: 5
              bootIndex: 0
              destinationType: volume
              deleteOnTermination: true
              volumeType: SSD
          networks:
            - name: my_network
    

    Boot From an Existing Volume

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const myvol = new opentelekomcloud.BlockstorageVolumeV2("myvol", {
        size: 5,
        imageId: imageId,
    });
    const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        blockDevices: [{
            uuid: myvol.blockstorageVolumeV2Id,
            sourceType: "volume",
            bootIndex: 0,
            destinationType: "volume",
            deleteOnTermination: true,
        }],
        networks: [{
            name: "my_network",
        }],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    myvol = opentelekomcloud.BlockstorageVolumeV2("myvol",
        size=5,
        image_id=image_id)
    boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        block_devices=[{
            "uuid": myvol.blockstorage_volume_v2_id,
            "source_type": "volume",
            "boot_index": 0,
            "destination_type": "volume",
            "delete_on_termination": True,
        }],
        networks=[{
            "name": "my_network",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		myvol, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "myvol", &opentelekomcloud.BlockstorageVolumeV2Args{
    			Size:    pulumi.Float64(5),
    			ImageId: pulumi.Any(imageId),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                myvol.BlockstorageVolumeV2Id,
    					SourceType:          pulumi.String("volume"),
    					BootIndex:           pulumi.Float64(0),
    					DestinationType:     pulumi.String("volume"),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_network"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var myvol = new Opentelekomcloud.BlockstorageVolumeV2("myvol", new()
        {
            Size = 5,
            ImageId = imageId,
        });
    
        var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
        {
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = myvol.BlockstorageVolumeV2Id,
                    SourceType = "volume",
                    BootIndex = 0,
                    DestinationType = "volume",
                    DeleteOnTermination = true,
                },
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_network",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            var myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
                .size(5)
                .imageId(imageId)
                .build());
    
            var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
                    .uuid(myvol.blockstorageVolumeV2Id())
                    .sourceType("volume")
                    .bootIndex(0)
                    .destinationType("volume")
                    .deleteOnTermination(true)
                    .build())
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name("my_network")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      myvol:
        type: opentelekomcloud:BlockstorageVolumeV2
        properties:
          size: 5
          imageId: ${imageId}
      boot-from-volume:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          blockDevices:
            - uuid: ${myvol.blockstorageVolumeV2Id}
              sourceType: volume
              bootIndex: 0
              destinationType: volume
              deleteOnTermination: true
          networks:
            - name: my_network
    

    Boot Instance, Create Volume, and Attach Volume as a Block Device

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const dataImageId = config.requireObject("dataImageId");
    const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        blockDevices: [
            {
                uuid: dataImageId,
                sourceType: "image",
                destinationType: "volume",
                bootIndex: 0,
                deleteOnTermination: true,
            },
            {
                sourceType: "blank",
                destinationType: "volume",
                volumeSize: 1,
                bootIndex: 1,
                deleteOnTermination: true,
            },
        ],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    data_image_id = config.require_object("dataImageId")
    instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        block_devices=[
            {
                "uuid": data_image_id,
                "source_type": "image",
                "destination_type": "volume",
                "boot_index": 0,
                "delete_on_termination": True,
            },
            {
                "source_type": "blank",
                "destination_type": "volume",
                "volume_size": 1,
                "boot_index": 1,
                "delete_on_termination": True,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		dataImageId := cfg.RequireObject("dataImageId")
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                pulumi.Any(dataImageId),
    					SourceType:          pulumi.String("image"),
    					DestinationType:     pulumi.String("volume"),
    					BootIndex:           pulumi.Float64(0),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					SourceType:          pulumi.String("blank"),
    					DestinationType:     pulumi.String("volume"),
    					VolumeSize:          pulumi.Float64(1),
    					BootIndex:           pulumi.Float64(1),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var dataImageId = config.RequireObject<dynamic>("dataImageId");
        var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = dataImageId,
                    SourceType = "image",
                    DestinationType = "volume",
                    BootIndex = 0,
                    DeleteOnTermination = true,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    SourceType = "blank",
                    DestinationType = "volume",
                    VolumeSize = 1,
                    BootIndex = 1,
                    DeleteOnTermination = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            final var dataImageId = config.get("dataImageId");
            var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .blockDevices(            
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .uuid(dataImageId)
                        .sourceType("image")
                        .destinationType("volume")
                        .bootIndex(0)
                        .deleteOnTermination(true)
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .sourceType("blank")
                        .destinationType("volume")
                        .volumeSize(1)
                        .bootIndex(1)
                        .deleteOnTermination(true)
                        .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
      dataImageId:
        type: dynamic
    resources:
      instance1:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          blockDevices:
            - uuid: ${dataImageId}
              sourceType: image
              destinationType: volume
              bootIndex: 0
              deleteOnTermination: true
            - sourceType: blank
              destinationType: volume
              volumeSize: 1
              bootIndex: 1
              deleteOnTermination: true
    

    Boot Instance and Attach Existing Volume as a Block Device

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const dataImageId = config.requireObject("dataImageId");
    const volume1 = new opentelekomcloud.BlockstorageVolumeV2("volume1", {size: 1});
    const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        blockDevices: [
            {
                uuid: dataImageId,
                sourceType: "image",
                destinationType: "volume",
                bootIndex: 0,
                deleteOnTermination: true,
            },
            {
                uuid: volume1.blockstorageVolumeV2Id,
                sourceType: "volume",
                destinationType: "volume",
                bootIndex: 1,
                deleteOnTermination: true,
            },
        ],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    data_image_id = config.require_object("dataImageId")
    volume1 = opentelekomcloud.BlockstorageVolumeV2("volume1", size=1)
    instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        block_devices=[
            {
                "uuid": data_image_id,
                "source_type": "image",
                "destination_type": "volume",
                "boot_index": 0,
                "delete_on_termination": True,
            },
            {
                "uuid": volume1.blockstorage_volume_v2_id,
                "source_type": "volume",
                "destination_type": "volume",
                "boot_index": 1,
                "delete_on_termination": True,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		dataImageId := cfg.RequireObject("dataImageId")
    		volume1, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "volume1", &opentelekomcloud.BlockstorageVolumeV2Args{
    			Size: pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                pulumi.Any(dataImageId),
    					SourceType:          pulumi.String("image"),
    					DestinationType:     pulumi.String("volume"),
    					BootIndex:           pulumi.Float64(0),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                volume1.BlockstorageVolumeV2Id,
    					SourceType:          pulumi.String("volume"),
    					DestinationType:     pulumi.String("volume"),
    					BootIndex:           pulumi.Float64(1),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var dataImageId = config.RequireObject<dynamic>("dataImageId");
        var volume1 = new Opentelekomcloud.BlockstorageVolumeV2("volume1", new()
        {
            Size = 1,
        });
    
        var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = dataImageId,
                    SourceType = "image",
                    DestinationType = "volume",
                    BootIndex = 0,
                    DeleteOnTermination = true,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = volume1.BlockstorageVolumeV2Id,
                    SourceType = "volume",
                    DestinationType = "volume",
                    BootIndex = 1,
                    DeleteOnTermination = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            final var dataImageId = config.get("dataImageId");
            var volume1 = new BlockstorageVolumeV2("volume1", BlockstorageVolumeV2Args.builder()
                .size(1)
                .build());
    
            var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .blockDevices(            
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .uuid(dataImageId)
                        .sourceType("image")
                        .destinationType("volume")
                        .bootIndex(0)
                        .deleteOnTermination(true)
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .uuid(volume1.blockstorageVolumeV2Id())
                        .sourceType("volume")
                        .destinationType("volume")
                        .bootIndex(1)
                        .deleteOnTermination(true)
                        .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
      dataImageId:
        type: dynamic
    resources:
      volume1:
        type: opentelekomcloud:BlockstorageVolumeV2
        properties:
          size: 1
      instance1:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          blockDevices:
            - uuid: ${dataImageId}
              sourceType: image
              destinationType: volume
              bootIndex: 0
              deleteOnTermination: true
            - uuid: ${volume1.blockstorageVolumeV2Id}
              sourceType: volume
              destinationType: volume
              bootIndex: 1
              deleteOnTermination: true
    

    Instance With Multiple Networks

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const secondSubnet = opentelekomcloud.getVpcSubnetV1({
        name: "my-subnet",
    });
    const myipNetworkingFloatingipV2 = new opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", {pool: "admin_external_net"});
    const multi_net = new opentelekomcloud.ComputeInstanceV2("multi-net", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        networks: [
            {
                name: "my_first_network",
            },
            {
                uuid: secondSubnet.then(secondSubnet => secondSubnet.networkId),
            },
        ],
    });
    const myipComputeFloatingipAssociateV2 = new opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", {
        floatingIp: myipNetworkingFloatingipV2.address,
        instanceId: multi_net.computeInstanceV2Id,
        fixedIp: multi_net.networks.apply(networks => networks?.[1]?.fixedIpV4),
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    second_subnet = opentelekomcloud.get_vpc_subnet_v1(name="my-subnet")
    myip_networking_floatingip_v2 = opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", pool="admin_external_net")
    multi_net = opentelekomcloud.ComputeInstanceV2("multi-net",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        networks=[
            {
                "name": "my_first_network",
            },
            {
                "uuid": second_subnet.network_id,
            },
        ])
    myip_compute_floatingip_associate_v2 = opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2",
        floating_ip=myip_networking_floatingip_v2.address,
        instance_id=multi_net.compute_instance_v2_id,
        fixed_ip=multi_net.networks[1].fixed_ip_v4)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		secondSubnet, err := opentelekomcloud.LookupVpcSubnetV1(ctx, &opentelekomcloud.LookupVpcSubnetV1Args{
    			Name: pulumi.StringRef("my-subnet"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		myipNetworkingFloatingipV2, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "myipNetworkingFloatingipV2", &opentelekomcloud.NetworkingFloatingipV2Args{
    			Pool: pulumi.String("admin_external_net"),
    		})
    		if err != nil {
    			return err
    		}
    		multi_net, err := opentelekomcloud.NewComputeInstanceV2(ctx, "multi-net", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_first_network"),
    				},
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Uuid: pulumi.String(secondSubnet.NetworkId),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewComputeFloatingipAssociateV2(ctx, "myipComputeFloatingipAssociateV2", &opentelekomcloud.ComputeFloatingipAssociateV2Args{
    			FloatingIp: myipNetworkingFloatingipV2.Address,
    			InstanceId: multi_net.ComputeInstanceV2Id,
    			FixedIp: pulumi.String(multi_net.Networks.ApplyT(func(networks []opentelekomcloud.ComputeInstanceV2Network) (*string, error) {
    				return &networks[1].FixedIpV4, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var secondSubnet = Opentelekomcloud.GetVpcSubnetV1.Invoke(new()
        {
            Name = "my-subnet",
        });
    
        var myipNetworkingFloatingipV2 = new Opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", new()
        {
            Pool = "admin_external_net",
        });
    
        var multi_net = new Opentelekomcloud.ComputeInstanceV2("multi-net", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_first_network",
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Uuid = secondSubnet.Apply(getVpcSubnetV1Result => getVpcSubnetV1Result.NetworkId),
                },
            },
        });
    
        var myipComputeFloatingipAssociateV2 = new Opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", new()
        {
            FloatingIp = myipNetworkingFloatingipV2.Address,
            InstanceId = multi_net.ComputeInstanceV2Id,
            FixedIp = multi_net.Networks.Apply(networks => networks[1]?.FixedIpV4),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetVpcSubnetV1Args;
    import com.pulumi.opentelekomcloud.NetworkingFloatingipV2;
    import com.pulumi.opentelekomcloud.NetworkingFloatingipV2Args;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    import com.pulumi.opentelekomcloud.ComputeFloatingipAssociateV2;
    import com.pulumi.opentelekomcloud.ComputeFloatingipAssociateV2Args;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            final var secondSubnet = OpentelekomcloudFunctions.getVpcSubnetV1(GetVpcSubnetV1Args.builder()
                .name("my-subnet")
                .build());
    
            var myipNetworkingFloatingipV2 = new NetworkingFloatingipV2("myipNetworkingFloatingipV2", NetworkingFloatingipV2Args.builder()
                .pool("admin_external_net")
                .build());
    
            var multi_net = new ComputeInstanceV2("multi-net", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .networks(            
                    ComputeInstanceV2NetworkArgs.builder()
                        .name("my_first_network")
                        .build(),
                    ComputeInstanceV2NetworkArgs.builder()
                        .uuid(secondSubnet.applyValue(getVpcSubnetV1Result -> getVpcSubnetV1Result.networkId()))
                        .build())
                .build());
    
            var myipComputeFloatingipAssociateV2 = new ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", ComputeFloatingipAssociateV2Args.builder()
                .floatingIp(myipNetworkingFloatingipV2.address())
                .instanceId(multi_net.computeInstanceV2Id())
                .fixedIp(multi_net.networks().applyValue(networks -> networks[1].fixedIpV4()))
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      myipNetworkingFloatingipV2:
        type: opentelekomcloud:NetworkingFloatingipV2
        properties:
          pool: admin_external_net
      multi-net:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          networks:
            - name: my_first_network
            - uuid: ${secondSubnet.networkId}
      myipComputeFloatingipAssociateV2:
        type: opentelekomcloud:ComputeFloatingipAssociateV2
        properties:
          floatingIp: ${myipNetworkingFloatingipV2.address}
          instanceId: ${["multi-net"].computeInstanceV2Id}
          fixedIp: ${["multi-net"].networks[1].fixedIpV4}
    variables:
      secondSubnet:
        fn::invoke:
          function: opentelekomcloud:getVpcSubnetV1
          arguments:
            name: my-subnet
    

    Instance with Multiple Ephemeral Disks

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const dataImageId = config.requireObject("dataImageId");
    const multi_eph = new opentelekomcloud.ComputeInstanceV2("multi-eph", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        blockDevices: [
            {
                bootIndex: 0,
                deleteOnTermination: true,
                destinationType: "volume",
                sourceType: "image",
                uuid: dataImageId,
            },
            {
                bootIndex: -1,
                deleteOnTermination: true,
                destinationType: "volume",
                sourceType: "blank",
                volumeSize: 1,
            },
            {
                bootIndex: -1,
                deleteOnTermination: true,
                destinationType: "volume",
                sourceType: "blank",
                volumeSize: 1,
            },
        ],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    data_image_id = config.require_object("dataImageId")
    multi_eph = opentelekomcloud.ComputeInstanceV2("multi-eph",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        block_devices=[
            {
                "boot_index": 0,
                "delete_on_termination": True,
                "destination_type": "volume",
                "source_type": "image",
                "uuid": data_image_id,
            },
            {
                "boot_index": -1,
                "delete_on_termination": True,
                "destination_type": "volume",
                "source_type": "blank",
                "volume_size": 1,
            },
            {
                "boot_index": -1,
                "delete_on_termination": True,
                "destination_type": "volume",
                "source_type": "blank",
                "volume_size": 1,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		dataImageId := cfg.RequireObject("dataImageId")
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "multi-eph", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(0),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("image"),
    					Uuid:                pulumi.Any(dataImageId),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(-1),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("blank"),
    					VolumeSize:          pulumi.Float64(1),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(-1),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("blank"),
    					VolumeSize:          pulumi.Float64(1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var dataImageId = config.RequireObject<dynamic>("dataImageId");
        var multi_eph = new Opentelekomcloud.ComputeInstanceV2("multi-eph", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = 0,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "image",
                    Uuid = dataImageId,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = -1,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "blank",
                    VolumeSize = 1,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = -1,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "blank",
                    VolumeSize = 1,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            final var dataImageId = config.get("dataImageId");
            var multi_eph = new ComputeInstanceV2("multi-eph", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .blockDevices(            
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(0)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("image")
                        .uuid(dataImageId)
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(-1)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("blank")
                        .volumeSize(1)
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(-1)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("blank")
                        .volumeSize(1)
                        .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
      dataImageId:
        type: dynamic
    resources:
      multi-eph:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          blockDevices:
            - bootIndex: 0
              deleteOnTermination: true
              destinationType: volume
              sourceType: image
              uuid: ${dataImageId}
            - bootIndex: -1
              deleteOnTermination: true
              destinationType: volume
              sourceType: blank
              volumeSize: 1
            - bootIndex: -1
              deleteOnTermination: true
              destinationType: volume
              sourceType: blank
              volumeSize: 1
    

    Instance with User Data (cloud-init)

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const imageId = config.requireObject("imageId");
    const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
        imageId: imageId,
        flavorId: "s2.large.4",
        keyPair: "my_key_pair_name",
        securityGroups: ["default"],
        userData: `#cloud-config
    hostname: instance_1.example.com
    fqdn: instance_1.example.com`,
        networks: [{
            name: "my_network",
        }],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    image_id = config.require_object("imageId")
    instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
        image_id=image_id,
        flavor_id="s2.large.4",
        key_pair="my_key_pair_name",
        security_groups=["default"],
        user_data="""#cloud-config
    hostname: instance_1.example.com
    fqdn: instance_1.example.com""",
        networks=[{
            "name": "my_network",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		imageId := cfg.RequireObject("imageId")
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(imageId),
    			FlavorId: pulumi.String("s2.large.4"),
    			KeyPair:  pulumi.String("my_key_pair_name"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    			UserData: pulumi.String("#cloud-config\nhostname: instance_1.example.com\nfqdn: instance_1.example.com"),
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.String("my_network"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var imageId = config.RequireObject<dynamic>("imageId");
        var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
        {
            ImageId = imageId,
            FlavorId = "s2.large.4",
            KeyPair = "my_key_pair_name",
            SecurityGroups = new[]
            {
                "default",
            },
            UserData = @"#cloud-config
    hostname: instance_1.example.com
    fqdn: instance_1.example.com",
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = "my_network",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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) {
            final var config = ctx.config();
            final var imageId = config.get("imageId");
            var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
                .imageId(imageId)
                .flavorId("s2.large.4")
                .keyPair("my_key_pair_name")
                .securityGroups("default")
                .userData("""
    #cloud-config
    hostname: instance_1.example.com
    fqdn: instance_1.example.com            """)
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name("my_network")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      imageId:
        type: dynamic
    resources:
      instance1:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${imageId}
          flavorId: s2.large.4
          keyPair: my_key_pair_name
          securityGroups:
            - default
          userData: |-
            #cloud-config
            hostname: instance_1.example.com
            fqdn: instance_1.example.com        
          networks:
            - name: my_network
    

    user_data can come from a variety of sources: inline, read in from the file function, or the template_cloudinit_config resource.

    Notes

    Multiple Ephemeral Disks

    It’s possible to specify multiple block_device entries to create an instance with multiple ephemeral (local) disks. In order to create multiple ephemeral disks, the sum of the total amount of ephemeral space must be less than or equal to what the chosen flavor supports.

    The following example shows how to create an instance with multiple ephemeral disks:

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const foo = new opentelekomcloud.ComputeInstanceV2("foo", {blockDevices: [
        {
            bootIndex: 0,
            deleteOnTermination: true,
            destinationType: "volume",
            sourceType: "image",
            uuid: _var.image_id,
        },
        {
            bootIndex: -1,
            deleteOnTermination: true,
            destinationType: "volume",
            sourceType: "blank",
            volumeSize: 1,
        },
        {
            bootIndex: -1,
            deleteOnTermination: true,
            destinationType: "volume",
            sourceType: "blank",
            volumeSize: 1,
        },
    ]});
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    foo = opentelekomcloud.ComputeInstanceV2("foo", block_devices=[
        {
            "boot_index": 0,
            "delete_on_termination": True,
            "destination_type": "volume",
            "source_type": "image",
            "uuid": var["image_id"],
        },
        {
            "boot_index": -1,
            "delete_on_termination": True,
            "destination_type": "volume",
            "source_type": "blank",
            "volume_size": 1,
        },
        {
            "boot_index": -1,
            "delete_on_termination": True,
            "destination_type": "volume",
            "source_type": "blank",
            "volume_size": 1,
        },
    ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "foo", &opentelekomcloud.ComputeInstanceV2Args{
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(0),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("image"),
    					Uuid:                pulumi.Any(_var.Image_id),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(-1),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("blank"),
    					VolumeSize:          pulumi.Float64(1),
    				},
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					BootIndex:           pulumi.Float64(-1),
    					DeleteOnTermination: pulumi.Bool(true),
    					DestinationType:     pulumi.String("volume"),
    					SourceType:          pulumi.String("blank"),
    					VolumeSize:          pulumi.Float64(1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Opentelekomcloud.ComputeInstanceV2("foo", new()
        {
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = 0,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "image",
                    Uuid = @var.Image_id,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = -1,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "blank",
                    VolumeSize = 1,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    BootIndex = -1,
                    DeleteOnTermination = true,
                    DestinationType = "volume",
                    SourceType = "blank",
                    VolumeSize = 1,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    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 foo = new ComputeInstanceV2("foo", ComputeInstanceV2Args.builder()
                .blockDevices(            
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(0)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("image")
                        .uuid(var_.image_id())
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(-1)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("blank")
                        .volumeSize(1)
                        .build(),
                    ComputeInstanceV2BlockDeviceArgs.builder()
                        .bootIndex(-1)
                        .deleteOnTermination(true)
                        .destinationType("volume")
                        .sourceType("blank")
                        .volumeSize(1)
                        .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          blockDevices:
            - bootIndex: 0
              deleteOnTermination: true
              destinationType: volume
              sourceType: image
              uuid: ${var.image_id}
            - bootIndex: -1
              deleteOnTermination: true
              destinationType: volume
              sourceType: blank
              volumeSize: 1
            - bootIndex: -1
              deleteOnTermination: true
              destinationType: volume
              sourceType: blank
              volumeSize: 1
    

    Importing basic instance

    Assume you want to import an instance with one ephemeral root disk, and one network interface.

    Your configuration would look like the following:

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const basicInstance = new opentelekomcloud.ComputeInstanceV2("basicInstance", {
        flavorId: _var.flavor_id,
        keyPair: _var.key_pair,
        imageId: _var.image_id,
        networks: [{
            name: _var.network_name,
        }],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    basic_instance = opentelekomcloud.ComputeInstanceV2("basicInstance",
        flavor_id=var["flavor_id"],
        key_pair=var["key_pair"],
        image_id=var["image_id"],
        networks=[{
            "name": var["network_name"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "basicInstance", &opentelekomcloud.ComputeInstanceV2Args{
    			FlavorId: pulumi.Any(_var.Flavor_id),
    			KeyPair:  pulumi.Any(_var.Key_pair),
    			ImageId:  pulumi.Any(_var.Image_id),
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.Any(_var.Network_name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var basicInstance = new Opentelekomcloud.ComputeInstanceV2("basicInstance", new()
        {
            FlavorId = @var.Flavor_id,
            KeyPair = @var.Key_pair,
            ImageId = @var.Image_id,
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = @var.Network_name,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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 basicInstance = new ComputeInstanceV2("basicInstance", ComputeInstanceV2Args.builder()
                .flavorId(var_.flavor_id())
                .keyPair(var_.key_pair())
                .imageId(var_.image_id())
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name(var_.network_name())
                    .build())
                .build());
    
        }
    }
    
    resources:
      basicInstance:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          flavorId: ${var.flavor_id}
          keyPair: ${var.key_pair}
          imageId: ${var.image_id}
          networks:
            - name: ${var.network_name}
    

    Then you execute

    terraform import opentelekomcloud_compute_instance_v2.basic_instance <instance_id>
    

    Importing instance with multiple network interfaces.

    Nova returns the network interfaces grouped by network, thus not in creation order. That means that if you have multiple network interfaces you must take care of the order of networks in your configuration.

    As example, we want to import an instance with one ephemeral root disk, and 3 network interfaces.

    Examples

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
        flavorId: _var.flavor_id,
        keyPair: _var.key_pair,
        imageId: _var.image_id,
        networks: [
            {
                name: _var.network_1_name,
            },
            {
                name: _var.network_2_name,
            },
            {
                name: _var.network_1_name,
                fixedIpV4: _var.fixed_ip_v4,
            },
        ],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
        flavor_id=var["flavor_id"],
        key_pair=var["key_pair"],
        image_id=var["image_id"],
        networks=[
            {
                "name": var["network_1_name"],
            },
            {
                "name": var["network_2_name"],
            },
            {
                "name": var["network_1_name"],
                "fixed_ip_v4": var["fixed_ip_v4"],
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
    			FlavorId: pulumi.Any(_var.Flavor_id),
    			KeyPair:  pulumi.Any(_var.Key_pair),
    			ImageId:  pulumi.Any(_var.Image_id),
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.Any(_var.Network_1_name),
    				},
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.Any(_var.Network_2_name),
    				},
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name:      pulumi.Any(_var.Network_1_name),
    					FixedIpV4: pulumi.Any(_var.Fixed_ip_v4),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
        {
            FlavorId = @var.Flavor_id,
            KeyPair = @var.Key_pair,
            ImageId = @var.Image_id,
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = @var.Network_1_name,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = @var.Network_2_name,
                },
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = @var.Network_1_name,
                    FixedIpV4 = @var.Fixed_ip_v4,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    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 boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
                .flavorId(var_.flavor_id())
                .keyPair(var_.key_pair())
                .imageId(var_.image_id())
                .networks(            
                    ComputeInstanceV2NetworkArgs.builder()
                        .name(var_.network_1_name())
                        .build(),
                    ComputeInstanceV2NetworkArgs.builder()
                        .name(var_.network_2_name())
                        .build(),
                    ComputeInstanceV2NetworkArgs.builder()
                        .name(var_.network_1_name())
                        .fixedIpV4(var_.fixed_ip_v4())
                        .build())
                .build());
    
        }
    }
    
    resources:
      boot-from-volume:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          flavorId: ${var.flavor_id}
          keyPair: ${var.key_pair}
          imageId: ${var.image_id}
          networks:
            - name: ${var.network_1_name}
            - name: ${var.network_2_name}
            - name: ${var.network_1_name}
              fixedIpV4: ${var.fixed_ip_v4}
    

    In the above configuration the networks are out of order compared to what nova and thus the import code returns, which means the plan will not be empty after import.

    So either with care check the plan and modify configuration, or read the network order in the state file after import and modify your configuration accordingly.

    • A note on ports. If you have created a neutron port independent of an instance, then the import code has no way to detect that the port is created idenpendently, and therefore on deletion of imported instances you might have port resources in your project, which you expected to be created by the instance and thus to also be deleted with the instance.

    Importing instances with multiple block storage volumes.

    We have an instance with two block storage volumes, one bootable and one non-bootable. Note that we only configure the bootable device as block_device. The other volumes can be specified as opentelekomcloud.BlockstorageVolumeV2

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const instance2 = new opentelekomcloud.ComputeInstanceV2("instance2", {
        imageId: _var.image_id,
        flavorId: _var.flavor_id,
        keyPair: _var.key_pair,
        blockDevices: [{
            uuid: _var.image_id,
            sourceType: "image",
            destinationType: "volume",
            bootIndex: 0,
            deleteOnTermination: true,
        }],
        networks: [{
            name: _var.network_name,
        }],
    });
    const volume1 = new opentelekomcloud.BlockstorageVolumeV2("volume1", {size: 1});
    const va1 = new opentelekomcloud.ComputeVolumeAttachV2("va1", {
        volumeId: volume1.blockstorageVolumeV2Id,
        instanceId: instance2.computeInstanceV2Id,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    instance2 = opentelekomcloud.ComputeInstanceV2("instance2",
        image_id=var["image_id"],
        flavor_id=var["flavor_id"],
        key_pair=var["key_pair"],
        block_devices=[{
            "uuid": var["image_id"],
            "source_type": "image",
            "destination_type": "volume",
            "boot_index": 0,
            "delete_on_termination": True,
        }],
        networks=[{
            "name": var["network_name"],
        }])
    volume1 = opentelekomcloud.BlockstorageVolumeV2("volume1", size=1)
    va1 = opentelekomcloud.ComputeVolumeAttachV2("va1",
        volume_id=volume1.blockstorage_volume_v2_id,
        instance_id=instance2.compute_instance_v2_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance2, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance2", &opentelekomcloud.ComputeInstanceV2Args{
    			ImageId:  pulumi.Any(_var.Image_id),
    			FlavorId: pulumi.Any(_var.Flavor_id),
    			KeyPair:  pulumi.Any(_var.Key_pair),
    			BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    				&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    					Uuid:                pulumi.Any(_var.Image_id),
    					SourceType:          pulumi.String("image"),
    					DestinationType:     pulumi.String("volume"),
    					BootIndex:           pulumi.Float64(0),
    					DeleteOnTermination: pulumi.Bool(true),
    				},
    			},
    			Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    				&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    					Name: pulumi.Any(_var.Network_name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		volume1, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "volume1", &opentelekomcloud.BlockstorageVolumeV2Args{
    			Size: pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewComputeVolumeAttachV2(ctx, "va1", &opentelekomcloud.ComputeVolumeAttachV2Args{
    			VolumeId:   volume1.BlockstorageVolumeV2Id,
    			InstanceId: instance2.ComputeInstanceV2Id,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance2 = new Opentelekomcloud.ComputeInstanceV2("instance2", new()
        {
            ImageId = @var.Image_id,
            FlavorId = @var.Flavor_id,
            KeyPair = @var.Key_pair,
            BlockDevices = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
                {
                    Uuid = @var.Image_id,
                    SourceType = "image",
                    DestinationType = "volume",
                    BootIndex = 0,
                    DeleteOnTermination = true,
                },
            },
            Networks = new[]
            {
                new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
                {
                    Name = @var.Network_name,
                },
            },
        });
    
        var volume1 = new Opentelekomcloud.BlockstorageVolumeV2("volume1", new()
        {
            Size = 1,
        });
    
        var va1 = new Opentelekomcloud.ComputeVolumeAttachV2("va1", new()
        {
            VolumeId = volume1.BlockstorageVolumeV2Id,
            InstanceId = instance2.ComputeInstanceV2Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2;
    import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
    import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
    import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
    import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2;
    import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2Args;
    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 instance2 = new ComputeInstanceV2("instance2", ComputeInstanceV2Args.builder()
                .imageId(var_.image_id())
                .flavorId(var_.flavor_id())
                .keyPair(var_.key_pair())
                .blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
                    .uuid(var_.image_id())
                    .sourceType("image")
                    .destinationType("volume")
                    .bootIndex(0)
                    .deleteOnTermination(true)
                    .build())
                .networks(ComputeInstanceV2NetworkArgs.builder()
                    .name(var_.network_name())
                    .build())
                .build());
    
            var volume1 = new BlockstorageVolumeV2("volume1", BlockstorageVolumeV2Args.builder()
                .size(1)
                .build());
    
            var va1 = new ComputeVolumeAttachV2("va1", ComputeVolumeAttachV2Args.builder()
                .volumeId(volume1.blockstorageVolumeV2Id())
                .instanceId(instance2.computeInstanceV2Id())
                .build());
    
        }
    }
    
    resources:
      instance2:
        type: opentelekomcloud:ComputeInstanceV2
        properties:
          imageId: ${var.image_id}
          flavorId: ${var.flavor_id}
          keyPair: ${var.key_pair}
          blockDevices:
            - uuid: ${var.image_id}
              sourceType: image
              destinationType: volume
              bootIndex: 0
              deleteOnTermination: true
          networks:
            - name: ${var.network_name}
      volume1:
        type: opentelekomcloud:BlockstorageVolumeV2
        properties:
          size: 1
      va1:
        type: opentelekomcloud:ComputeVolumeAttachV2
        properties:
          volumeId: ${volume1.blockstorageVolumeV2Id}
          instanceId: ${instance2.computeInstanceV2Id}
    

    To import the instance outlined in the above configuration do the following:

    terraform import opentelekomcloud_compute_instance_v2.instance_2 <instance_id>
    import opentelekomcloud_blockstorage_volume_v2.volume_1 <volume_id>
    terraform import opentelekomcloud_compute_volume_attach_v2.va_1
    <instance_id>/<volume_id>
    
    • A note on block storage volumes, the importer does not read delete_on_termination flag, and always assumes true. If you import an instance created with delete_on_termination false, you end up with “orphaned” volumes after destruction of instances.

    Create ComputeInstanceV2 Resource

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

    Constructor syntax

    new ComputeInstanceV2(name: string, args?: ComputeInstanceV2Args, opts?: CustomResourceOptions);
    @overload
    def ComputeInstanceV2(resource_name: str,
                          args: Optional[ComputeInstanceV2Args] = None,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeInstanceV2(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          access_ip_v4: Optional[str] = None,
                          access_ip_v6: Optional[str] = None,
                          admin_pass: Optional[str] = None,
                          auto_recovery: Optional[bool] = None,
                          availability_zone: Optional[str] = None,
                          block_devices: Optional[Sequence[ComputeInstanceV2BlockDeviceArgs]] = None,
                          compute_instance_v2_id: Optional[str] = None,
                          config_drive: Optional[bool] = None,
                          description: Optional[str] = None,
                          flavor_id: Optional[str] = None,
                          flavor_name: Optional[str] = None,
                          image_id: Optional[str] = None,
                          image_name: Optional[str] = None,
                          key_pair: Optional[str] = None,
                          metadata: Optional[Mapping[str, str]] = None,
                          name: Optional[str] = None,
                          networks: Optional[Sequence[ComputeInstanceV2NetworkArgs]] = None,
                          power_state: Optional[str] = None,
                          region: Optional[str] = None,
                          scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
                          security_groups: Optional[Sequence[str]] = None,
                          ssh_private_key_path: Optional[str] = None,
                          stop_before_destroy: Optional[bool] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          timeouts: Optional[ComputeInstanceV2TimeoutsArgs] = None,
                          user_data: Optional[str] = None)
    func NewComputeInstanceV2(ctx *Context, name string, args *ComputeInstanceV2Args, opts ...ResourceOption) (*ComputeInstanceV2, error)
    public ComputeInstanceV2(string name, ComputeInstanceV2Args? args = null, CustomResourceOptions? opts = null)
    public ComputeInstanceV2(String name, ComputeInstanceV2Args args)
    public ComputeInstanceV2(String name, ComputeInstanceV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:ComputeInstanceV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ComputeInstanceV2Args
    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 ComputeInstanceV2Args
    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 ComputeInstanceV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeInstanceV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeInstanceV2Args
    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 computeInstanceV2Resource = new Opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource", new()
    {
        AccessIpV4 = "string",
        AccessIpV6 = "string",
        AdminPass = "string",
        AutoRecovery = false,
        AvailabilityZone = "string",
        BlockDevices = new[]
        {
            new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
            {
                SourceType = "string",
                BootIndex = 0,
                DeleteOnTermination = false,
                DestinationType = "string",
                DeviceName = "string",
                GuestFormat = "string",
                Uuid = "string",
                VolumeSize = 0,
                VolumeType = "string",
            },
        },
        ComputeInstanceV2Id = "string",
        ConfigDrive = false,
        Description = "string",
        FlavorId = "string",
        FlavorName = "string",
        ImageId = "string",
        ImageName = "string",
        KeyPair = "string",
        Metadata = 
        {
            { "string", "string" },
        },
        Name = "string",
        Networks = new[]
        {
            new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
            {
                AccessNetwork = false,
                FixedIpV4 = "string",
                FixedIpV6 = "string",
                Mac = "string",
                Name = "string",
                Port = "string",
                Uuid = "string",
            },
        },
        PowerState = "string",
        Region = "string",
        SchedulerHints = new[]
        {
            new Opentelekomcloud.Inputs.ComputeInstanceV2SchedulerHintArgs
            {
                BuildNearHostIp = "string",
                DehId = "string",
                DifferentHosts = new[]
                {
                    "string",
                },
                Group = "string",
                Queries = new[]
                {
                    "string",
                },
                SameHosts = new[]
                {
                    "string",
                },
                TargetCell = "string",
                Tenancy = "string",
            },
        },
        SecurityGroups = new[]
        {
            "string",
        },
        SshPrivateKeyPath = "string",
        StopBeforeDestroy = false,
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Opentelekomcloud.Inputs.ComputeInstanceV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        UserData = "string",
    });
    
    example, err := opentelekomcloud.NewComputeInstanceV2(ctx, "computeInstanceV2Resource", &opentelekomcloud.ComputeInstanceV2Args{
    	AccessIpV4:       pulumi.String("string"),
    	AccessIpV6:       pulumi.String("string"),
    	AdminPass:        pulumi.String("string"),
    	AutoRecovery:     pulumi.Bool(false),
    	AvailabilityZone: pulumi.String("string"),
    	BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
    		&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
    			SourceType:          pulumi.String("string"),
    			BootIndex:           pulumi.Float64(0),
    			DeleteOnTermination: pulumi.Bool(false),
    			DestinationType:     pulumi.String("string"),
    			DeviceName:          pulumi.String("string"),
    			GuestFormat:         pulumi.String("string"),
    			Uuid:                pulumi.String("string"),
    			VolumeSize:          pulumi.Float64(0),
    			VolumeType:          pulumi.String("string"),
    		},
    	},
    	ComputeInstanceV2Id: pulumi.String("string"),
    	ConfigDrive:         pulumi.Bool(false),
    	Description:         pulumi.String("string"),
    	FlavorId:            pulumi.String("string"),
    	FlavorName:          pulumi.String("string"),
    	ImageId:             pulumi.String("string"),
    	ImageName:           pulumi.String("string"),
    	KeyPair:             pulumi.String("string"),
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
    		&opentelekomcloud.ComputeInstanceV2NetworkArgs{
    			AccessNetwork: pulumi.Bool(false),
    			FixedIpV4:     pulumi.String("string"),
    			FixedIpV6:     pulumi.String("string"),
    			Mac:           pulumi.String("string"),
    			Name:          pulumi.String("string"),
    			Port:          pulumi.String("string"),
    			Uuid:          pulumi.String("string"),
    		},
    	},
    	PowerState: pulumi.String("string"),
    	Region:     pulumi.String("string"),
    	SchedulerHints: opentelekomcloud.ComputeInstanceV2SchedulerHintArray{
    		&opentelekomcloud.ComputeInstanceV2SchedulerHintArgs{
    			BuildNearHostIp: pulumi.String("string"),
    			DehId:           pulumi.String("string"),
    			DifferentHosts: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Group: pulumi.String("string"),
    			Queries: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SameHosts: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			TargetCell: pulumi.String("string"),
    			Tenancy:    pulumi.String("string"),
    		},
    	},
    	SecurityGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SshPrivateKeyPath: pulumi.String("string"),
    	StopBeforeDestroy: pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &opentelekomcloud.ComputeInstanceV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	UserData: pulumi.String("string"),
    })
    
    var computeInstanceV2Resource = new ComputeInstanceV2("computeInstanceV2Resource", ComputeInstanceV2Args.builder()
        .accessIpV4("string")
        .accessIpV6("string")
        .adminPass("string")
        .autoRecovery(false)
        .availabilityZone("string")
        .blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
            .sourceType("string")
            .bootIndex(0)
            .deleteOnTermination(false)
            .destinationType("string")
            .deviceName("string")
            .guestFormat("string")
            .uuid("string")
            .volumeSize(0)
            .volumeType("string")
            .build())
        .computeInstanceV2Id("string")
        .configDrive(false)
        .description("string")
        .flavorId("string")
        .flavorName("string")
        .imageId("string")
        .imageName("string")
        .keyPair("string")
        .metadata(Map.of("string", "string"))
        .name("string")
        .networks(ComputeInstanceV2NetworkArgs.builder()
            .accessNetwork(false)
            .fixedIpV4("string")
            .fixedIpV6("string")
            .mac("string")
            .name("string")
            .port("string")
            .uuid("string")
            .build())
        .powerState("string")
        .region("string")
        .schedulerHints(ComputeInstanceV2SchedulerHintArgs.builder()
            .buildNearHostIp("string")
            .dehId("string")
            .differentHosts("string")
            .group("string")
            .queries("string")
            .sameHosts("string")
            .targetCell("string")
            .tenancy("string")
            .build())
        .securityGroups("string")
        .sshPrivateKeyPath("string")
        .stopBeforeDestroy(false)
        .tags(Map.of("string", "string"))
        .timeouts(ComputeInstanceV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .userData("string")
        .build());
    
    compute_instance_v2_resource = opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource",
        access_ip_v4="string",
        access_ip_v6="string",
        admin_pass="string",
        auto_recovery=False,
        availability_zone="string",
        block_devices=[{
            "source_type": "string",
            "boot_index": 0,
            "delete_on_termination": False,
            "destination_type": "string",
            "device_name": "string",
            "guest_format": "string",
            "uuid": "string",
            "volume_size": 0,
            "volume_type": "string",
        }],
        compute_instance_v2_id="string",
        config_drive=False,
        description="string",
        flavor_id="string",
        flavor_name="string",
        image_id="string",
        image_name="string",
        key_pair="string",
        metadata={
            "string": "string",
        },
        name="string",
        networks=[{
            "access_network": False,
            "fixed_ip_v4": "string",
            "fixed_ip_v6": "string",
            "mac": "string",
            "name": "string",
            "port": "string",
            "uuid": "string",
        }],
        power_state="string",
        region="string",
        scheduler_hints=[{
            "build_near_host_ip": "string",
            "deh_id": "string",
            "different_hosts": ["string"],
            "group": "string",
            "queries": ["string"],
            "same_hosts": ["string"],
            "target_cell": "string",
            "tenancy": "string",
        }],
        security_groups=["string"],
        ssh_private_key_path="string",
        stop_before_destroy=False,
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        user_data="string")
    
    const computeInstanceV2Resource = new opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource", {
        accessIpV4: "string",
        accessIpV6: "string",
        adminPass: "string",
        autoRecovery: false,
        availabilityZone: "string",
        blockDevices: [{
            sourceType: "string",
            bootIndex: 0,
            deleteOnTermination: false,
            destinationType: "string",
            deviceName: "string",
            guestFormat: "string",
            uuid: "string",
            volumeSize: 0,
            volumeType: "string",
        }],
        computeInstanceV2Id: "string",
        configDrive: false,
        description: "string",
        flavorId: "string",
        flavorName: "string",
        imageId: "string",
        imageName: "string",
        keyPair: "string",
        metadata: {
            string: "string",
        },
        name: "string",
        networks: [{
            accessNetwork: false,
            fixedIpV4: "string",
            fixedIpV6: "string",
            mac: "string",
            name: "string",
            port: "string",
            uuid: "string",
        }],
        powerState: "string",
        region: "string",
        schedulerHints: [{
            buildNearHostIp: "string",
            dehId: "string",
            differentHosts: ["string"],
            group: "string",
            queries: ["string"],
            sameHosts: ["string"],
            targetCell: "string",
            tenancy: "string",
        }],
        securityGroups: ["string"],
        sshPrivateKeyPath: "string",
        stopBeforeDestroy: false,
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        userData: "string",
    });
    
    type: opentelekomcloud:ComputeInstanceV2
    properties:
        accessIpV4: string
        accessIpV6: string
        adminPass: string
        autoRecovery: false
        availabilityZone: string
        blockDevices:
            - bootIndex: 0
              deleteOnTermination: false
              destinationType: string
              deviceName: string
              guestFormat: string
              sourceType: string
              uuid: string
              volumeSize: 0
              volumeType: string
        computeInstanceV2Id: string
        configDrive: false
        description: string
        flavorId: string
        flavorName: string
        imageId: string
        imageName: string
        keyPair: string
        metadata:
            string: string
        name: string
        networks:
            - accessNetwork: false
              fixedIpV4: string
              fixedIpV6: string
              mac: string
              name: string
              port: string
              uuid: string
        powerState: string
        region: string
        schedulerHints:
            - buildNearHostIp: string
              dehId: string
              differentHosts:
                - string
              group: string
              queries:
                - string
              sameHosts:
                - string
              targetCell: string
              tenancy: string
        securityGroups:
            - string
        sshPrivateKeyPath: string
        stopBeforeDestroy: false
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
        userData: string
    

    ComputeInstanceV2 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 ComputeInstanceV2 resource accepts the following input properties:

    AccessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    AccessIpV6 string
    The first detected Fixed IPv6 address.
    AdminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    AutoRecovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    AvailabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    BlockDevices List<ComputeInstanceV2BlockDevice>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    ComputeInstanceV2Id string
    ConfigDrive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    Description string
    Server description.
    FlavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    FlavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    ImageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    ImageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    KeyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    Metadata Dictionary<string, string>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    Name string
    A unique name for the resource.
    Networks List<ComputeInstanceV2Network>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    PowerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    Region string
    SchedulerHints List<ComputeInstanceV2SchedulerHint>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    SecurityGroups List<string>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    StopBeforeDestroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    Tags Dictionary<string, string>
    Tags key/value pairs to associate with the instance.
    Timeouts ComputeInstanceV2Timeouts
    UserData string
    The user data to provide when launching the instance. Changing this creates a new server.
    AccessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    AccessIpV6 string
    The first detected Fixed IPv6 address.
    AdminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    AutoRecovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    AvailabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    BlockDevices []ComputeInstanceV2BlockDeviceArgs
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    ComputeInstanceV2Id string
    ConfigDrive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    Description string
    Server description.
    FlavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    FlavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    ImageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    ImageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    KeyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    Metadata map[string]string
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    Name string
    A unique name for the resource.
    Networks []ComputeInstanceV2NetworkArgs
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    PowerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    Region string
    SchedulerHints []ComputeInstanceV2SchedulerHintArgs
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    SecurityGroups []string

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    StopBeforeDestroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    Tags map[string]string
    Tags key/value pairs to associate with the instance.
    Timeouts ComputeInstanceV2TimeoutsArgs
    UserData string
    The user data to provide when launching the instance. Changing this creates a new server.
    accessIpV4 String
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 String
    The first detected Fixed IPv6 address.
    adminPass String
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    autoRecovery Boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone String
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices List<ComputeInstanceV2BlockDevice>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id String
    configDrive Boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description String
    Server description.
    flavorId String
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName String
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId String
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName String
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair String
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Map<String,String>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name String
    A unique name for the resource.
    networks List<ComputeInstanceV2Network>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    powerState String

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region String
    schedulerHints List<ComputeInstanceV2SchedulerHint>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups List<String>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy Boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Map<String,String>
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2Timeouts
    userData String
    The user data to provide when launching the instance. Changing this creates a new server.
    accessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 string
    The first detected Fixed IPv6 address.
    adminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    autoRecovery boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices ComputeInstanceV2BlockDevice[]
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id string
    configDrive boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description string
    Server description.
    flavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata {[key: string]: string}
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name string
    A unique name for the resource.
    networks ComputeInstanceV2Network[]
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    powerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region string
    schedulerHints ComputeInstanceV2SchedulerHint[]
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups string[]

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags {[key: string]: string}
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2Timeouts
    userData string
    The user data to provide when launching the instance. Changing this creates a new server.
    access_ip_v4 str
    The first detected Fixed IPv4 address or the Floating IP.
    access_ip_v6 str
    The first detected Fixed IPv6 address.
    admin_pass str
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    auto_recovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availability_zone str
    The availability zone in which to create the server. Changing this creates a new server.
    block_devices Sequence[ComputeInstanceV2BlockDeviceArgs]
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    compute_instance_v2_id str
    config_drive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description str
    Server description.
    flavor_id str
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavor_name str
    The name of the desired flavor for the server. Changing this resizes the existing server.
    image_id str
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    image_name str
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    key_pair str
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Mapping[str, str]
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name str
    A unique name for the resource.
    networks Sequence[ComputeInstanceV2NetworkArgs]
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    power_state str

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region str
    scheduler_hints Sequence[ComputeInstanceV2SchedulerHintArgs]
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    security_groups Sequence[str]

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    ssh_private_key_path str
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stop_before_destroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Mapping[str, str]
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2TimeoutsArgs
    user_data str
    The user data to provide when launching the instance. Changing this creates a new server.
    accessIpV4 String
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 String
    The first detected Fixed IPv6 address.
    adminPass String
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    autoRecovery Boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone String
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices List<Property Map>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id String
    configDrive Boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description String
    Server description.
    flavorId String
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName String
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId String
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName String
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair String
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Map<String>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name String
    A unique name for the resource.
    networks List<Property Map>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    powerState String

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region String
    schedulerHints List<Property Map>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups List<String>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy Boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Map<String>
    Tags key/value pairs to associate with the instance.
    timeouts Property Map
    userData String
    The user data to provide when launching the instance. Changing this creates a new server.

    Outputs

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

    AllMetadata Dictionary<string, string>
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    VolumeAttacheds List<ComputeInstanceV2VolumeAttached>
    AllMetadata map[string]string
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    VolumeAttacheds []ComputeInstanceV2VolumeAttached
    allMetadata Map<String,String>
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    volumeAttacheds List<ComputeInstanceV2VolumeAttached>
    allMetadata {[key: string]: string}
    encryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    volumeAttacheds ComputeInstanceV2VolumeAttached[]
    all_metadata Mapping[str, str]
    encrypted_password str
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    volume_attacheds Sequence[ComputeInstanceV2VolumeAttached]
    allMetadata Map<String>
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    volumeAttacheds List<Property Map>

    Look up Existing ComputeInstanceV2 Resource

    Get an existing ComputeInstanceV2 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?: ComputeInstanceV2State, opts?: CustomResourceOptions): ComputeInstanceV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_ip_v4: Optional[str] = None,
            access_ip_v6: Optional[str] = None,
            admin_pass: Optional[str] = None,
            all_metadata: Optional[Mapping[str, str]] = None,
            auto_recovery: Optional[bool] = None,
            availability_zone: Optional[str] = None,
            block_devices: Optional[Sequence[ComputeInstanceV2BlockDeviceArgs]] = None,
            compute_instance_v2_id: Optional[str] = None,
            config_drive: Optional[bool] = None,
            description: Optional[str] = None,
            encrypted_password: Optional[str] = None,
            flavor_id: Optional[str] = None,
            flavor_name: Optional[str] = None,
            image_id: Optional[str] = None,
            image_name: Optional[str] = None,
            key_pair: Optional[str] = None,
            metadata: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            networks: Optional[Sequence[ComputeInstanceV2NetworkArgs]] = None,
            password: Optional[str] = None,
            power_state: Optional[str] = None,
            region: Optional[str] = None,
            scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
            security_groups: Optional[Sequence[str]] = None,
            ssh_private_key_path: Optional[str] = None,
            stop_before_destroy: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ComputeInstanceV2TimeoutsArgs] = None,
            user_data: Optional[str] = None,
            volume_attacheds: Optional[Sequence[ComputeInstanceV2VolumeAttachedArgs]] = None) -> ComputeInstanceV2
    func GetComputeInstanceV2(ctx *Context, name string, id IDInput, state *ComputeInstanceV2State, opts ...ResourceOption) (*ComputeInstanceV2, error)
    public static ComputeInstanceV2 Get(string name, Input<string> id, ComputeInstanceV2State? state, CustomResourceOptions? opts = null)
    public static ComputeInstanceV2 get(String name, Output<String> id, ComputeInstanceV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:ComputeInstanceV2    get:      id: ${id}
    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:
    AccessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    AccessIpV6 string
    The first detected Fixed IPv6 address.
    AdminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    AllMetadata Dictionary<string, string>
    AutoRecovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    AvailabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    BlockDevices List<ComputeInstanceV2BlockDevice>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    ComputeInstanceV2Id string
    ConfigDrive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    Description string
    Server description.
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    FlavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    FlavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    ImageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    ImageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    KeyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    Metadata Dictionary<string, string>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    Name string
    A unique name for the resource.
    Networks List<ComputeInstanceV2Network>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    PowerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    Region string
    SchedulerHints List<ComputeInstanceV2SchedulerHint>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    SecurityGroups List<string>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    StopBeforeDestroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    Tags Dictionary<string, string>
    Tags key/value pairs to associate with the instance.
    Timeouts ComputeInstanceV2Timeouts
    UserData string
    The user data to provide when launching the instance. Changing this creates a new server.
    VolumeAttacheds List<ComputeInstanceV2VolumeAttached>
    AccessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    AccessIpV6 string
    The first detected Fixed IPv6 address.
    AdminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    AllMetadata map[string]string
    AutoRecovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    AvailabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    BlockDevices []ComputeInstanceV2BlockDeviceArgs
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    ComputeInstanceV2Id string
    ConfigDrive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    Description string
    Server description.
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    FlavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    FlavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    ImageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    ImageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    KeyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    Metadata map[string]string
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    Name string
    A unique name for the resource.
    Networks []ComputeInstanceV2NetworkArgs
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    PowerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    Region string
    SchedulerHints []ComputeInstanceV2SchedulerHintArgs
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    SecurityGroups []string

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    StopBeforeDestroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    Tags map[string]string
    Tags key/value pairs to associate with the instance.
    Timeouts ComputeInstanceV2TimeoutsArgs
    UserData string
    The user data to provide when launching the instance. Changing this creates a new server.
    VolumeAttacheds []ComputeInstanceV2VolumeAttachedArgs
    accessIpV4 String
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 String
    The first detected Fixed IPv6 address.
    adminPass String
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    allMetadata Map<String,String>
    autoRecovery Boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone String
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices List<ComputeInstanceV2BlockDevice>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id String
    configDrive Boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description String
    Server description.
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId String
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName String
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId String
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName String
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair String
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Map<String,String>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name String
    A unique name for the resource.
    networks List<ComputeInstanceV2Network>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState String

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region String
    schedulerHints List<ComputeInstanceV2SchedulerHint>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups List<String>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy Boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Map<String,String>
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2Timeouts
    userData String
    The user data to provide when launching the instance. Changing this creates a new server.
    volumeAttacheds List<ComputeInstanceV2VolumeAttached>
    accessIpV4 string
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 string
    The first detected Fixed IPv6 address.
    adminPass string
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    allMetadata {[key: string]: string}
    autoRecovery boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone string
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices ComputeInstanceV2BlockDevice[]
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id string
    configDrive boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description string
    Server description.
    encryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId string
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName string
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId string
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName string
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair string
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata {[key: string]: string}
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name string
    A unique name for the resource.
    networks ComputeInstanceV2Network[]
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState string

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region string
    schedulerHints ComputeInstanceV2SchedulerHint[]
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups string[]

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags {[key: string]: string}
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2Timeouts
    userData string
    The user data to provide when launching the instance. Changing this creates a new server.
    volumeAttacheds ComputeInstanceV2VolumeAttached[]
    access_ip_v4 str
    The first detected Fixed IPv4 address or the Floating IP.
    access_ip_v6 str
    The first detected Fixed IPv6 address.
    admin_pass str
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    all_metadata Mapping[str, str]
    auto_recovery bool
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availability_zone str
    The availability zone in which to create the server. Changing this creates a new server.
    block_devices Sequence[ComputeInstanceV2BlockDeviceArgs]
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    compute_instance_v2_id str
    config_drive bool
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description str
    Server description.
    encrypted_password str
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavor_id str
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavor_name str
    The name of the desired flavor for the server. Changing this resizes the existing server.
    image_id str
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    image_name str
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    key_pair str
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Mapping[str, str]
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name str
    A unique name for the resource.
    networks Sequence[ComputeInstanceV2NetworkArgs]
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    password str
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    power_state str

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region str
    scheduler_hints Sequence[ComputeInstanceV2SchedulerHintArgs]
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    security_groups Sequence[str]

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    ssh_private_key_path str
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stop_before_destroy bool
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Mapping[str, str]
    Tags key/value pairs to associate with the instance.
    timeouts ComputeInstanceV2TimeoutsArgs
    user_data str
    The user data to provide when launching the instance. Changing this creates a new server.
    volume_attacheds Sequence[ComputeInstanceV2VolumeAttachedArgs]
    accessIpV4 String
    The first detected Fixed IPv4 address or the Floating IP.
    accessIpV6 String
    The first detected Fixed IPv6 address.
    adminPass String
    The administrative password to assign to the server. Changing this changes the root password on the existing server.
    allMetadata Map<String>
    autoRecovery Boolean
    Configures or deletes automatic recovery of an instance. Defaults to true.
    availabilityZone String
    The availability zone in which to create the server. Changing this creates a new server.
    blockDevices List<Property Map>
    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
    computeInstanceV2Id String
    configDrive Boolean
    Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
    description String
    Server description.
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId String
    The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
    flavorName String
    The name of the desired flavor for the server. Changing this resizes the existing server.
    imageId String
    (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.
    imageName String
    (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.
    keyPair String
    The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
    metadata Map<String>
    Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
    name String
    A unique name for the resource.
    networks List<Property Map>
    An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState String

    Provide the VM state. Only active and shutoff are supported values.

    -> If the initial power_state is the shutoff the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.

    region String
    schedulerHints List<Property Map>
    Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
    securityGroups List<String>

    An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.

    Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.

    When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    stopBeforeDestroy Boolean
    Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
    tags Map<String>
    Tags key/value pairs to associate with the instance.
    timeouts Property Map
    userData String
    The user data to provide when launching the instance. Changing this creates a new server.
    volumeAttacheds List<Property Map>

    Supporting Types

    ComputeInstanceV2BlockDevice, ComputeInstanceV2BlockDeviceArgs

    SourceType string
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    BootIndex double
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    DeleteOnTermination bool
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    DestinationType string
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    DeviceName string
    GuestFormat string
    Uuid string
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    VolumeSize double
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    VolumeType string

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    SourceType string
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    BootIndex float64
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    DeleteOnTermination bool
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    DestinationType string
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    DeviceName string
    GuestFormat string
    Uuid string
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    VolumeSize float64
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    VolumeType string

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    sourceType String
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    bootIndex Double
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    deleteOnTermination Boolean
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    destinationType String
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    deviceName String
    guestFormat String
    uuid String
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    volumeSize Double
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    volumeType String

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    sourceType string
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    bootIndex number
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    deleteOnTermination boolean
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    destinationType string
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    deviceName string
    guestFormat string
    uuid string
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    volumeSize number
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    volumeType string

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    source_type str
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    boot_index float
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    delete_on_termination bool
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    destination_type str
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    device_name str
    guest_format str
    uuid str
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    volume_size float
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    volume_type str

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    sourceType String
    The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
    bootIndex Number
    The boot index of the volume. It defaults to 0. Changing this creates a new server.
    deleteOnTermination Boolean
    Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
    destinationType String
    The type that gets created. Currently only support "volume". Changing this creates a new server.
    deviceName String
    guestFormat String
    uuid String
    The UUID of the image, volume, or snapshot. Changing this creates a new server.
    volumeSize Number
    The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
    volumeType String

    Currently, the value can be SSD (ultra-I/O disk type), SAS (high I/O disk type), or SATA (common I/O disk type) OTC-API

    NOTE: Common I/O (SATA) will reach end of life, end of 2025.

    ComputeInstanceV2Network, ComputeInstanceV2NetworkArgs

    AccessNetwork bool
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    FixedIpV4 string
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    FixedIpV6 string
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    Mac string
    Name string
    The human-readable name of the network. Changing this creates a new server.
    Port string
    The port UUID of a network to attach to the server. Changing this creates a new server.
    Uuid string
    The network UUID to attach to the server. Changing this creates a new server.
    AccessNetwork bool
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    FixedIpV4 string
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    FixedIpV6 string
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    Mac string
    Name string
    The human-readable name of the network. Changing this creates a new server.
    Port string
    The port UUID of a network to attach to the server. Changing this creates a new server.
    Uuid string
    The network UUID to attach to the server. Changing this creates a new server.
    accessNetwork Boolean
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    fixedIpV4 String
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    fixedIpV6 String
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    mac String
    name String
    The human-readable name of the network. Changing this creates a new server.
    port String
    The port UUID of a network to attach to the server. Changing this creates a new server.
    uuid String
    The network UUID to attach to the server. Changing this creates a new server.
    accessNetwork boolean
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    fixedIpV4 string
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    fixedIpV6 string
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    mac string
    name string
    The human-readable name of the network. Changing this creates a new server.
    port string
    The port UUID of a network to attach to the server. Changing this creates a new server.
    uuid string
    The network UUID to attach to the server. Changing this creates a new server.
    access_network bool
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    fixed_ip_v4 str
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    fixed_ip_v6 str
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    mac str
    name str
    The human-readable name of the network. Changing this creates a new server.
    port str
    The port UUID of a network to attach to the server. Changing this creates a new server.
    uuid str
    The network UUID to attach to the server. Changing this creates a new server.
    accessNetwork Boolean
    Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
    fixedIpV4 String
    Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
    fixedIpV6 String
    Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
    mac String
    name String
    The human-readable name of the network. Changing this creates a new server.
    port String
    The port UUID of a network to attach to the server. Changing this creates a new server.
    uuid String
    The network UUID to attach to the server. Changing this creates a new server.

    ComputeInstanceV2SchedulerHint, ComputeInstanceV2SchedulerHintArgs

    BuildNearHostIp string
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    DehId string
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    DifferentHosts List<string>
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    Group string
    A UUID of a Server Group. The instance will be placed into that group.
    Queries List<string>
    A conditional query that a compute node must pass in order to host an instance.
    SameHosts List<string>
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    TargetCell string
    The name of a cell to host the instance.
    Tenancy string
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
    BuildNearHostIp string
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    DehId string
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    DifferentHosts []string
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    Group string
    A UUID of a Server Group. The instance will be placed into that group.
    Queries []string
    A conditional query that a compute node must pass in order to host an instance.
    SameHosts []string
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    TargetCell string
    The name of a cell to host the instance.
    Tenancy string
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
    buildNearHostIp String
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    dehId String
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    differentHosts List<String>
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    group String
    A UUID of a Server Group. The instance will be placed into that group.
    queries List<String>
    A conditional query that a compute node must pass in order to host an instance.
    sameHosts List<String>
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    targetCell String
    The name of a cell to host the instance.
    tenancy String
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
    buildNearHostIp string
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    dehId string
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    differentHosts string[]
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    group string
    A UUID of a Server Group. The instance will be placed into that group.
    queries string[]
    A conditional query that a compute node must pass in order to host an instance.
    sameHosts string[]
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    targetCell string
    The name of a cell to host the instance.
    tenancy string
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
    build_near_host_ip str
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    deh_id str
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    different_hosts Sequence[str]
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    group str
    A UUID of a Server Group. The instance will be placed into that group.
    queries Sequence[str]
    A conditional query that a compute node must pass in order to host an instance.
    same_hosts Sequence[str]
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    target_cell str
    The name of a cell to host the instance.
    tenancy str
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
    buildNearHostIp String
    An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
    dehId String
    The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
    differentHosts List<String>
    A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
    group String
    A UUID of a Server Group. The instance will be placed into that group.
    queries List<String>
    A conditional query that a compute node must pass in order to host an instance.
    sameHosts List<String>
    A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
    targetCell String
    The name of a cell to host the instance.
    tenancy String
    The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.

    ComputeInstanceV2Timeouts, ComputeInstanceV2TimeoutsArgs

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

    ComputeInstanceV2VolumeAttached, ComputeInstanceV2VolumeAttachedArgs

    Id string
    Id string
    id String
    id string
    id str
    id String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud