1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. EcsInstanceV1
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.EcsInstanceV1

Explore with Pulumi AI

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

Manages a V1 ECS instance resource within OpenTelekomCloud.

Example Usage

Basic Instance

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

const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    availabilityZone: "eu-de-01",
    flavor: "s2.large.2",
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    keyName: "KeyPair-test",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    tags: {
        muh: "kuh",
    },
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

basic = opentelekomcloud.EcsInstanceV1("basic",
    availability_zone="eu-de-01",
    flavor="s2.large.2",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    key_name="KeyPair-test",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    tags={
        "muh": "kuh",
    },
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
Copy
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.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			AvailabilityZone: pulumi.String("eu-de-01"),
			Flavor:           pulumi.String("s2.large.2"),
			ImageId:          pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			KeyName:          pulumi.String("KeyPair-test"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			Tags: pulumi.StringMap{
				"muh": pulumi.String("kuh"),
			},
			VpcId: pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        AvailabilityZone = "eu-de-01",
        Flavor = "s2.large.2",
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        KeyName = "KeyPair-test",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        Tags = 
        {
            { "muh", "kuh" },
        },
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
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 basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .availabilityZone("eu-de-01")
            .flavor("s2.large.2")
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .keyName("KeyPair-test")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .tags(Map.of("muh", "kuh"))
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .build());

    }
}
Copy
resources:
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      availabilityZone: eu-de-01
      flavor: s2.large.2
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      keyName: KeyPair-test
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      tags:
        muh: kuh
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
Copy

Basic Instance with security group

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

const secgroup1 = new opentelekomcloud.ComputeSecgroupV2("secgroup1", {});
const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor: "s2.large.2",
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    securityGroups: [secgroup1.computeSecgroupV2Id],
    availabilityZone: "eu-de-01",
    keyName: "KeyPair-test",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

secgroup1 = opentelekomcloud.ComputeSecgroupV2("secgroup1")
basic = opentelekomcloud.EcsInstanceV1("basic",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor="s2.large.2",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    security_groups=[secgroup1.compute_secgroup_v2_id],
    availability_zone="eu-de-01",
    key_name="KeyPair-test")
Copy
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 {
		secgroup1, err := opentelekomcloud.NewComputeSecgroupV2(ctx, "secgroup1", nil)
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			Flavor:  pulumi.String("s2.large.2"),
			VpcId:   pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			SecurityGroups: pulumi.StringArray{
				secgroup1.ComputeSecgroupV2Id,
			},
			AvailabilityZone: pulumi.String("eu-de-01"),
			KeyName:          pulumi.String("KeyPair-test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var secgroup1 = new Opentelekomcloud.ComputeSecgroupV2("secgroup1");

    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        Flavor = "s2.large.2",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        SecurityGroups = new[]
        {
            secgroup1.ComputeSecgroupV2Id,
        },
        AvailabilityZone = "eu-de-01",
        KeyName = "KeyPair-test",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeSecgroupV2;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
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 secgroup1 = new ComputeSecgroupV2("secgroup1");

        var basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .flavor("s2.large.2")
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .securityGroups(secgroup1.computeSecgroupV2Id())
            .availabilityZone("eu-de-01")
            .keyName("KeyPair-test")
            .build());

    }
}
Copy
resources:
  secgroup1:
    type: opentelekomcloud:ComputeSecgroupV2
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      flavor: s2.large.2
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      securityGroups:
        - ${secgroup1.computeSecgroupV2Id}
      availabilityZone: eu-de-01
      keyName: KeyPair-test
Copy

Instance with Data Disks

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

const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    availabilityZone: "eu-de-01",
    dataDisks: [
        {
            size: 10,
            type: "SATA",
        },
        {
            size: 20,
            type: "SAS",
        },
    ],
    deleteDisksOnTermination: true,
    flavor: "s2.large.2",
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    keyName: "KeyPair-test",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    systemDiskSize: 40,
    systemDiskType: "SAS",
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

basic = opentelekomcloud.EcsInstanceV1("basic",
    availability_zone="eu-de-01",
    data_disks=[
        {
            "size": 10,
            "type": "SATA",
        },
        {
            "size": 20,
            "type": "SAS",
        },
    ],
    delete_disks_on_termination=True,
    flavor="s2.large.2",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    key_name="KeyPair-test",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    system_disk_size=40,
    system_disk_type="SAS",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
Copy
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.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			AvailabilityZone: pulumi.String("eu-de-01"),
			DataDisks: opentelekomcloud.EcsInstanceV1DataDiskArray{
				&opentelekomcloud.EcsInstanceV1DataDiskArgs{
					Size: pulumi.Float64(10),
					Type: pulumi.String("SATA"),
				},
				&opentelekomcloud.EcsInstanceV1DataDiskArgs{
					Size: pulumi.Float64(20),
					Type: pulumi.String("SAS"),
				},
			},
			DeleteDisksOnTermination: pulumi.Bool(true),
			Flavor:                   pulumi.String("s2.large.2"),
			ImageId:                  pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			KeyName:                  pulumi.String("KeyPair-test"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			SystemDiskSize: pulumi.Float64(40),
			SystemDiskType: pulumi.String("SAS"),
			VpcId:          pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        AvailabilityZone = "eu-de-01",
        DataDisks = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1DataDiskArgs
            {
                Size = 10,
                Type = "SATA",
            },
            new Opentelekomcloud.Inputs.EcsInstanceV1DataDiskArgs
            {
                Size = 20,
                Type = "SAS",
            },
        },
        DeleteDisksOnTermination = true,
        Flavor = "s2.large.2",
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        KeyName = "KeyPair-test",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        SystemDiskSize = 40,
        SystemDiskType = "SAS",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1DataDiskArgs;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
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 basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .availabilityZone("eu-de-01")
            .dataDisks(            
                EcsInstanceV1DataDiskArgs.builder()
                    .size("10")
                    .type("SATA")
                    .build(),
                EcsInstanceV1DataDiskArgs.builder()
                    .size("20")
                    .type("SAS")
                    .build())
            .deleteDisksOnTermination(true)
            .flavor("s2.large.2")
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .keyName("KeyPair-test")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .systemDiskSize(40)
            .systemDiskType("SAS")
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .build());

    }
}
Copy
resources:
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      availabilityZone: eu-de-01
      dataDisks:
        - size: '10'
          type: SATA
        - size: '20'
          type: SAS
      deleteDisksOnTermination: true
      flavor: s2.large.2
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      keyName: KeyPair-test
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      systemDiskSize: 40
      systemDiskType: SAS
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
Copy

Instance With Attached Volume

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

const myvol = new opentelekomcloud.BlockstorageVolumeV2("myvol", {size: 1});
const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor: "s2.large.2",
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    availabilityZone: "eu-de-01",
    keyName: "KeyPair-test",
});
const attached = new opentelekomcloud.ComputeVolumeAttachV2("attached", {
    instanceId: basic.ecsInstanceV1Id,
    volumeId: myvol.blockstorageVolumeV2Id,
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

myvol = opentelekomcloud.BlockstorageVolumeV2("myvol", size=1)
basic = opentelekomcloud.EcsInstanceV1("basic",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor="s2.large.2",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    availability_zone="eu-de-01",
    key_name="KeyPair-test")
attached = opentelekomcloud.ComputeVolumeAttachV2("attached",
    instance_id=basic.ecs_instance_v1_id,
    volume_id=myvol.blockstorage_volume_v2_id)
Copy
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 {
		myvol, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "myvol", &opentelekomcloud.BlockstorageVolumeV2Args{
			Size: pulumi.Float64(1),
		})
		if err != nil {
			return err
		}
		basic, err := opentelekomcloud.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			Flavor:  pulumi.String("s2.large.2"),
			VpcId:   pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			AvailabilityZone: pulumi.String("eu-de-01"),
			KeyName:          pulumi.String("KeyPair-test"),
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewComputeVolumeAttachV2(ctx, "attached", &opentelekomcloud.ComputeVolumeAttachV2Args{
			InstanceId: basic.EcsInstanceV1Id,
			VolumeId:   myvol.BlockstorageVolumeV2Id,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var myvol = new Opentelekomcloud.BlockstorageVolumeV2("myvol", new()
    {
        Size = 1,
    });

    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        Flavor = "s2.large.2",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        AvailabilityZone = "eu-de-01",
        KeyName = "KeyPair-test",
    });

    var attached = new Opentelekomcloud.ComputeVolumeAttachV2("attached", new()
    {
        InstanceId = basic.EcsInstanceV1Id,
        VolumeId = myvol.BlockstorageVolumeV2Id,
    });

});
Copy
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.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
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 myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
            .size(1)
            .build());

        var basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .flavor("s2.large.2")
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .availabilityZone("eu-de-01")
            .keyName("KeyPair-test")
            .build());

        var attached = new ComputeVolumeAttachV2("attached", ComputeVolumeAttachV2Args.builder()
            .instanceId(basic.ecsInstanceV1Id())
            .volumeId(myvol.blockstorageVolumeV2Id())
            .build());

    }
}
Copy
resources:
  myvol:
    type: opentelekomcloud:BlockstorageVolumeV2
    properties:
      size: 1
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      flavor: s2.large.2
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      availabilityZone: eu-de-01
      keyName: KeyPair-test
  attached:
    type: opentelekomcloud:ComputeVolumeAttachV2
    properties:
      instanceId: ${basic.ecsInstanceV1Id}
      volumeId: ${myvol.blockstorageVolumeV2Id}
Copy

Instance With Multiple Networks

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

const thisNetworkingFloatingipV2 = new opentelekomcloud.NetworkingFloatingipV2("thisNetworkingFloatingipV2", {pool: "admin_external_net"});
const thisEcsInstanceV1 = new opentelekomcloud.EcsInstanceV1("thisEcsInstanceV1", {
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor: "s2.large.2",
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics: [
        {
            networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
        },
        {
            networkId: "2c0a74a9-4395-4e62-a17b-e3e86fbf66b7",
        },
    ],
    availabilityZone: "eu-de-01",
    keyName: "KeyPair-test",
});
const thisNetworkingFloatingipAssociateV2 = new opentelekomcloud.NetworkingFloatingipAssociateV2("thisNetworkingFloatingipAssociateV2", {
    floatingIp: thisNetworkingFloatingipV2.address,
    portId: thisEcsInstanceV1.nics.apply(nics => nics[0].portId),
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

this_networking_floatingip_v2 = opentelekomcloud.NetworkingFloatingipV2("thisNetworkingFloatingipV2", pool="admin_external_net")
this_ecs_instance_v1 = opentelekomcloud.EcsInstanceV1("thisEcsInstanceV1",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor="s2.large.2",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics=[
        {
            "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
        },
        {
            "network_id": "2c0a74a9-4395-4e62-a17b-e3e86fbf66b7",
        },
    ],
    availability_zone="eu-de-01",
    key_name="KeyPair-test")
this_networking_floatingip_associate_v2 = opentelekomcloud.NetworkingFloatingipAssociateV2("thisNetworkingFloatingipAssociateV2",
    floating_ip=this_networking_floatingip_v2.address,
    port_id=this_ecs_instance_v1.nics[0].port_id)
Copy
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 {
		thisNetworkingFloatingipV2, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "thisNetworkingFloatingipV2", &opentelekomcloud.NetworkingFloatingipV2Args{
			Pool: pulumi.String("admin_external_net"),
		})
		if err != nil {
			return err
		}
		thisEcsInstanceV1, err := opentelekomcloud.NewEcsInstanceV1(ctx, "thisEcsInstanceV1", &opentelekomcloud.EcsInstanceV1Args{
			ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			Flavor:  pulumi.String("s2.large.2"),
			VpcId:   pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("2c0a74a9-4395-4e62-a17b-e3e86fbf66b7"),
				},
			},
			AvailabilityZone: pulumi.String("eu-de-01"),
			KeyName:          pulumi.String("KeyPair-test"),
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewNetworkingFloatingipAssociateV2(ctx, "thisNetworkingFloatingipAssociateV2", &opentelekomcloud.NetworkingFloatingipAssociateV2Args{
			FloatingIp: thisNetworkingFloatingipV2.Address,
			PortId: pulumi.String(thisEcsInstanceV1.Nics.ApplyT(func(nics []opentelekomcloud.EcsInstanceV1Nic) (*string, error) {
				return &nics[0].PortId, nil
			}).(pulumi.StringPtrOutput)),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var thisNetworkingFloatingipV2 = new Opentelekomcloud.NetworkingFloatingipV2("thisNetworkingFloatingipV2", new()
    {
        Pool = "admin_external_net",
    });

    var thisEcsInstanceV1 = new Opentelekomcloud.EcsInstanceV1("thisEcsInstanceV1", new()
    {
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        Flavor = "s2.large.2",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "2c0a74a9-4395-4e62-a17b-e3e86fbf66b7",
            },
        },
        AvailabilityZone = "eu-de-01",
        KeyName = "KeyPair-test",
    });

    var thisNetworkingFloatingipAssociateV2 = new Opentelekomcloud.NetworkingFloatingipAssociateV2("thisNetworkingFloatingipAssociateV2", new()
    {
        FloatingIp = thisNetworkingFloatingipV2.Address,
        PortId = thisEcsInstanceV1.Nics.Apply(nics => nics[0].PortId),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingFloatingipV2;
import com.pulumi.opentelekomcloud.NetworkingFloatingipV2Args;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
import com.pulumi.opentelekomcloud.NetworkingFloatingipAssociateV2;
import com.pulumi.opentelekomcloud.NetworkingFloatingipAssociateV2Args;
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 thisNetworkingFloatingipV2 = new NetworkingFloatingipV2("thisNetworkingFloatingipV2", NetworkingFloatingipV2Args.builder()
            .pool("admin_external_net")
            .build());

        var thisEcsInstanceV1 = new EcsInstanceV1("thisEcsInstanceV1", EcsInstanceV1Args.builder()
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .flavor("s2.large.2")
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .nics(            
                EcsInstanceV1NicArgs.builder()
                    .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                    .build(),
                EcsInstanceV1NicArgs.builder()
                    .networkId("2c0a74a9-4395-4e62-a17b-e3e86fbf66b7")
                    .build())
            .availabilityZone("eu-de-01")
            .keyName("KeyPair-test")
            .build());

        var thisNetworkingFloatingipAssociateV2 = new NetworkingFloatingipAssociateV2("thisNetworkingFloatingipAssociateV2", NetworkingFloatingipAssociateV2Args.builder()
            .floatingIp(thisNetworkingFloatingipV2.address())
            .portId(thisEcsInstanceV1.nics().applyValue(nics -> nics[0].portId()))
            .build());

    }
}
Copy
resources:
  thisNetworkingFloatingipV2:
    type: opentelekomcloud:NetworkingFloatingipV2
    properties:
      pool: admin_external_net
  thisEcsInstanceV1:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      flavor: s2.large.2
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
        - networkId: 2c0a74a9-4395-4e62-a17b-e3e86fbf66b7
      availabilityZone: eu-de-01
      keyName: KeyPair-test
  thisNetworkingFloatingipAssociateV2:
    type: opentelekomcloud:NetworkingFloatingipAssociateV2
    properties:
      floatingIp: ${thisNetworkingFloatingipV2.address}
      portId: ${thisEcsInstanceV1.nics[0].portId}
Copy

Instance with User Data (cloud-init)

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

const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    flavor: "s2.large.2",
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    keyName: "KeyPair-test",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    userData: `#cloud-config
hostname: server_1.example.com
fqdn: server_1.example.com
`,
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

basic = opentelekomcloud.EcsInstanceV1("basic",
    flavor="s2.large.2",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    key_name="KeyPair-test",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    user_data="""#cloud-config
hostname: server_1.example.com
fqdn: server_1.example.com
""",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
Copy
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.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			Flavor:  pulumi.String("s2.large.2"),
			ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			KeyName: pulumi.String("KeyPair-test"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			UserData: pulumi.String("#cloud-config\nhostname: server_1.example.com\nfqdn: server_1.example.com\n"),
			VpcId:    pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        Flavor = "s2.large.2",
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        KeyName = "KeyPair-test",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        UserData = @"#cloud-config
hostname: server_1.example.com
fqdn: server_1.example.com
",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
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 basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .flavor("s2.large.2")
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .keyName("KeyPair-test")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .userData("""
#cloud-config
hostname: server_1.example.com
fqdn: server_1.example.com
            """)
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .build());

    }
}
Copy
resources:
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      flavor: s2.large.2
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      keyName: KeyPair-test
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      userData: |
        #cloud-config
        hostname: server_1.example.com
        fqdn: server_1.example.com        
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
Copy

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

Instance with scheduler hints

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

const sg1 = new opentelekomcloud.ComputeServergroupV2("sg1", {policies: ["anti-affinity"]});
const basic = new opentelekomcloud.EcsInstanceV1("basic", {
    imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor: "s2.large.2",
    vpcId: "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics: [{
        networkId: "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    availabilityZone: "eu-de-01",
    keyName: "KeyPair-test",
    osSchedulerHints: [{
        group: sg1.computeServergroupV2Id,
        tenancy: "shared",
    }],
    tags: {
        muh: "kuh",
    },
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

sg1 = opentelekomcloud.ComputeServergroupV2("sg1", policies=["anti-affinity"])
basic = opentelekomcloud.EcsInstanceV1("basic",
    image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
    flavor="s2.large.2",
    vpc_id="8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
    nics=[{
        "network_id": "55534eaa-533a-419d-9b40-ec427ea7195a",
    }],
    availability_zone="eu-de-01",
    key_name="KeyPair-test",
    os_scheduler_hints=[{
        "group": sg1.compute_servergroup_v2_id,
        "tenancy": "shared",
    }],
    tags={
        "muh": "kuh",
    })
Copy
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 {
		sg1, err := opentelekomcloud.NewComputeServergroupV2(ctx, "sg1", &opentelekomcloud.ComputeServergroupV2Args{
			Policies: pulumi.StringArray{
				pulumi.String("anti-affinity"),
			},
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewEcsInstanceV1(ctx, "basic", &opentelekomcloud.EcsInstanceV1Args{
			ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
			Flavor:  pulumi.String("s2.large.2"),
			VpcId:   pulumi.String("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235"),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.String("55534eaa-533a-419d-9b40-ec427ea7195a"),
				},
			},
			AvailabilityZone: pulumi.String("eu-de-01"),
			KeyName:          pulumi.String("KeyPair-test"),
			OsSchedulerHints: opentelekomcloud.EcsInstanceV1OsSchedulerHintArray{
				&opentelekomcloud.EcsInstanceV1OsSchedulerHintArgs{
					Group:   sg1.ComputeServergroupV2Id,
					Tenancy: pulumi.String("shared"),
				},
			},
			Tags: pulumi.StringMap{
				"muh": pulumi.String("kuh"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var sg1 = new Opentelekomcloud.ComputeServergroupV2("sg1", new()
    {
        Policies = new[]
        {
            "anti-affinity",
        },
    });

    var basic = new Opentelekomcloud.EcsInstanceV1("basic", new()
    {
        ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
        Flavor = "s2.large.2",
        VpcId = "8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235",
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = "55534eaa-533a-419d-9b40-ec427ea7195a",
            },
        },
        AvailabilityZone = "eu-de-01",
        KeyName = "KeyPair-test",
        OsSchedulerHints = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1OsSchedulerHintArgs
            {
                Group = sg1.ComputeServergroupV2Id,
                Tenancy = "shared",
            },
        },
        Tags = 
        {
            { "muh", "kuh" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeServergroupV2;
import com.pulumi.opentelekomcloud.ComputeServergroupV2Args;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1OsSchedulerHintArgs;
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 sg1 = new ComputeServergroupV2("sg1", ComputeServergroupV2Args.builder()
            .policies("anti-affinity")
            .build());

        var basic = new EcsInstanceV1("basic", EcsInstanceV1Args.builder()
            .imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
            .flavor("s2.large.2")
            .vpcId("8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235")
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId("55534eaa-533a-419d-9b40-ec427ea7195a")
                .build())
            .availabilityZone("eu-de-01")
            .keyName("KeyPair-test")
            .osSchedulerHints(EcsInstanceV1OsSchedulerHintArgs.builder()
                .group(sg1.computeServergroupV2Id())
                .tenancy("shared")
                .build())
            .tags(Map.of("muh", "kuh"))
            .build());

    }
}
Copy
resources:
  sg1:
    type: opentelekomcloud:ComputeServergroupV2
    properties:
      policies:
        - anti-affinity
  basic:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
      flavor: s2.large.2
      vpcId: 8eed4fc7-e5e5-44a2-b5f2-23b3e5d46235
      nics:
        - networkId: 55534eaa-533a-419d-9b40-ec427ea7195a
      availabilityZone: eu-de-01
      keyName: KeyPair-test
      osSchedulerHints:
        - group: ${sg1.computeServergroupV2Id}
          tenancy: shared
      tags:
        muh: kuh
Copy

Instance with encrypted disks

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

const ecs = new opentelekomcloud.EcsInstanceV1("ecs", {
    flavor: _var.flavor_name,
    availabilityZone: _var.az,
    securityGroups: [data.opentelekomcloud_networking_secgroup_v2["default"].id],
    vpcId: _var.vpc_id,
    imageId: _var.image_id,
    autoRecovery: true,
    nics: [{
        networkId: _var.vpc_subnetwork_id,
        ipAddress: _var.private_ip,
    }],
    systemDiskType: _var.disk_type,
    systemDiskSize: _var.disk_size,
    systemDiskKmsId: _var.key_disk_encryption,
    deleteDisksOnTermination: true,
    dataDisks: [{
        type: "SSD",
        size: 40,
        kmsId: _var.key_disk_encryption,
    }],
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

ecs = opentelekomcloud.EcsInstanceV1("ecs",
    flavor=var["flavor_name"],
    availability_zone=var["az"],
    security_groups=[data["opentelekomcloud_networking_secgroup_v2"]["default"]["id"]],
    vpc_id=var["vpc_id"],
    image_id=var["image_id"],
    auto_recovery=True,
    nics=[{
        "network_id": var["vpc_subnetwork_id"],
        "ip_address": var["private_ip"],
    }],
    system_disk_type=var["disk_type"],
    system_disk_size=var["disk_size"],
    system_disk_kms_id=var["key_disk_encryption"],
    delete_disks_on_termination=True,
    data_disks=[{
        "type": "SSD",
        "size": 40,
        "kms_id": var["key_disk_encryption"],
    }])
Copy
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.NewEcsInstanceV1(ctx, "ecs", &opentelekomcloud.EcsInstanceV1Args{
			Flavor:           pulumi.Any(_var.Flavor_name),
			AvailabilityZone: pulumi.Any(_var.Az),
			SecurityGroups: pulumi.StringArray{
				data.Opentelekomcloud_networking_secgroup_v2.Default.Id,
			},
			VpcId:        pulumi.Any(_var.Vpc_id),
			ImageId:      pulumi.Any(_var.Image_id),
			AutoRecovery: pulumi.Bool(true),
			Nics: opentelekomcloud.EcsInstanceV1NicArray{
				&opentelekomcloud.EcsInstanceV1NicArgs{
					NetworkId: pulumi.Any(_var.Vpc_subnetwork_id),
					IpAddress: pulumi.Any(_var.Private_ip),
				},
			},
			SystemDiskType:           pulumi.Any(_var.Disk_type),
			SystemDiskSize:           pulumi.Any(_var.Disk_size),
			SystemDiskKmsId:          pulumi.Any(_var.Key_disk_encryption),
			DeleteDisksOnTermination: pulumi.Bool(true),
			DataDisks: opentelekomcloud.EcsInstanceV1DataDiskArray{
				&opentelekomcloud.EcsInstanceV1DataDiskArgs{
					Type:  pulumi.String("SSD"),
					Size:  pulumi.Float64(40),
					KmsId: pulumi.Any(_var.Key_disk_encryption),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var ecs = new Opentelekomcloud.EcsInstanceV1("ecs", new()
    {
        Flavor = @var.Flavor_name,
        AvailabilityZone = @var.Az,
        SecurityGroups = new[]
        {
            data.Opentelekomcloud_networking_secgroup_v2.Default.Id,
        },
        VpcId = @var.Vpc_id,
        ImageId = @var.Image_id,
        AutoRecovery = true,
        Nics = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
            {
                NetworkId = @var.Vpc_subnetwork_id,
                IpAddress = @var.Private_ip,
            },
        },
        SystemDiskType = @var.Disk_type,
        SystemDiskSize = @var.Disk_size,
        SystemDiskKmsId = @var.Key_disk_encryption,
        DeleteDisksOnTermination = true,
        DataDisks = new[]
        {
            new Opentelekomcloud.Inputs.EcsInstanceV1DataDiskArgs
            {
                Type = "SSD",
                Size = 40,
                KmsId = @var.Key_disk_encryption,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.EcsInstanceV1;
import com.pulumi.opentelekomcloud.EcsInstanceV1Args;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1NicArgs;
import com.pulumi.opentelekomcloud.inputs.EcsInstanceV1DataDiskArgs;
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 ecs = new EcsInstanceV1("ecs", EcsInstanceV1Args.builder()
            .flavor(var_.flavor_name())
            .availabilityZone(var_.az())
            .securityGroups(data.opentelekomcloud_networking_secgroup_v2().default().id())
            .vpcId(var_.vpc_id())
            .imageId(var_.image_id())
            .autoRecovery(true)
            .nics(EcsInstanceV1NicArgs.builder()
                .networkId(var_.vpc_subnetwork_id())
                .ipAddress(var_.private_ip())
                .build())
            .systemDiskType(var_.disk_type())
            .systemDiskSize(var_.disk_size())
            .systemDiskKmsId(var_.key_disk_encryption())
            .deleteDisksOnTermination(true)
            .dataDisks(EcsInstanceV1DataDiskArgs.builder()
                .type("SSD")
                .size(40)
                .kmsId(var_.key_disk_encryption())
                .build())
            .build());

    }
}
Copy
resources:
  ecs:
    type: opentelekomcloud:EcsInstanceV1
    properties:
      flavor: ${var.flavor_name}
      availabilityZone: ${var.az}
      securityGroups:
        - ${data.opentelekomcloud_networking_secgroup_v2.default.id}
      vpcId: ${var.vpc_id}
      imageId: ${var.image_id}
      autoRecovery: true
      nics:
        - networkId: ${var.vpc_subnetwork_id}
          ipAddress: ${var.private_ip}
      systemDiskType: ${var.disk_type}
      systemDiskSize: ${var.disk_size}
      systemDiskKmsId: ${var.key_disk_encryption}
      deleteDisksOnTermination: true
      dataDisks:
        - type: SSD
          size: 40
          kmsId: ${var.key_disk_encryption}
Copy

~> Encrypted disks requires EVS to be authorized to use KMS keys. The easiest way is to create an encrypted instance via the console - this should be done only once per project. Another way is to use an agency, same way it’s done for CCE.

Create EcsInstanceV1 Resource

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

Constructor syntax

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

@overload
def EcsInstanceV1(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  flavor: Optional[str] = None,
                  vpc_id: Optional[str] = None,
                  nics: Optional[Sequence[EcsInstanceV1NicArgs]] = None,
                  image_id: Optional[str] = None,
                  os_scheduler_hints: Optional[Sequence[EcsInstanceV1OsSchedulerHintArgs]] = None,
                  password: Optional[str] = None,
                  delete_disks_on_termination: Optional[bool] = None,
                  key_name: Optional[str] = None,
                  name: Optional[str] = None,
                  data_disks: Optional[Sequence[EcsInstanceV1DataDiskArgs]] = None,
                  auto_recovery: Optional[bool] = None,
                  ecs_instance_v1_id: Optional[str] = None,
                  security_groups: Optional[Sequence[str]] = None,
                  system_disk_kms_id: Optional[str] = None,
                  system_disk_size: Optional[float] = None,
                  system_disk_type: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  timeouts: Optional[EcsInstanceV1TimeoutsArgs] = None,
                  user_data: Optional[str] = None,
                  availability_zone: Optional[str] = None)
func NewEcsInstanceV1(ctx *Context, name string, args EcsInstanceV1Args, opts ...ResourceOption) (*EcsInstanceV1, error)
public EcsInstanceV1(string name, EcsInstanceV1Args args, CustomResourceOptions? opts = null)
public EcsInstanceV1(String name, EcsInstanceV1Args args)
public EcsInstanceV1(String name, EcsInstanceV1Args args, CustomResourceOptions options)
type: opentelekomcloud:EcsInstanceV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EcsInstanceV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EcsInstanceV1Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EcsInstanceV1Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EcsInstanceV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EcsInstanceV1Args
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 ecsInstanceV1Resource = new Opentelekomcloud.EcsInstanceV1("ecsInstanceV1Resource", new()
{
    Flavor = "string",
    VpcId = "string",
    Nics = new[]
    {
        new Opentelekomcloud.Inputs.EcsInstanceV1NicArgs
        {
            NetworkId = "string",
            IpAddress = "string",
            MacAddress = "string",
            PortId = "string",
            Type = "string",
        },
    },
    ImageId = "string",
    OsSchedulerHints = new[]
    {
        new Opentelekomcloud.Inputs.EcsInstanceV1OsSchedulerHintArgs
        {
            DedicatedHostId = "string",
            Group = "string",
            Tenancy = "string",
        },
    },
    Password = "string",
    DeleteDisksOnTermination = false,
    KeyName = "string",
    Name = "string",
    DataDisks = new[]
    {
        new Opentelekomcloud.Inputs.EcsInstanceV1DataDiskArgs
        {
            Size = 0,
            Type = "string",
            Id = "string",
            KmsId = "string",
            SnapshotId = "string",
        },
    },
    AutoRecovery = false,
    EcsInstanceV1Id = "string",
    SecurityGroups = new[]
    {
        "string",
    },
    SystemDiskKmsId = "string",
    SystemDiskSize = 0,
    SystemDiskType = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Opentelekomcloud.Inputs.EcsInstanceV1TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
    UserData = "string",
    AvailabilityZone = "string",
});
Copy
example, err := opentelekomcloud.NewEcsInstanceV1(ctx, "ecsInstanceV1Resource", &opentelekomcloud.EcsInstanceV1Args{
Flavor: pulumi.String("string"),
VpcId: pulumi.String("string"),
Nics: .EcsInstanceV1NicArray{
&.EcsInstanceV1NicArgs{
NetworkId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
PortId: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
ImageId: pulumi.String("string"),
OsSchedulerHints: .EcsInstanceV1OsSchedulerHintArray{
&.EcsInstanceV1OsSchedulerHintArgs{
DedicatedHostId: pulumi.String("string"),
Group: pulumi.String("string"),
Tenancy: pulumi.String("string"),
},
},
Password: pulumi.String("string"),
DeleteDisksOnTermination: pulumi.Bool(false),
KeyName: pulumi.String("string"),
Name: pulumi.String("string"),
DataDisks: .EcsInstanceV1DataDiskArray{
&.EcsInstanceV1DataDiskArgs{
Size: pulumi.Float64(0),
Type: pulumi.String("string"),
Id: pulumi.String("string"),
KmsId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
},
},
AutoRecovery: pulumi.Bool(false),
EcsInstanceV1Id: pulumi.String("string"),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SystemDiskKmsId: pulumi.String("string"),
SystemDiskSize: pulumi.Float64(0),
SystemDiskType: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &.EcsInstanceV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
UserData: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
})
Copy
var ecsInstanceV1Resource = new EcsInstanceV1("ecsInstanceV1Resource", EcsInstanceV1Args.builder()
    .flavor("string")
    .vpcId("string")
    .nics(EcsInstanceV1NicArgs.builder()
        .networkId("string")
        .ipAddress("string")
        .macAddress("string")
        .portId("string")
        .type("string")
        .build())
    .imageId("string")
    .osSchedulerHints(EcsInstanceV1OsSchedulerHintArgs.builder()
        .dedicatedHostId("string")
        .group("string")
        .tenancy("string")
        .build())
    .password("string")
    .deleteDisksOnTermination(false)
    .keyName("string")
    .name("string")
    .dataDisks(EcsInstanceV1DataDiskArgs.builder()
        .size(0)
        .type("string")
        .id("string")
        .kmsId("string")
        .snapshotId("string")
        .build())
    .autoRecovery(false)
    .ecsInstanceV1Id("string")
    .securityGroups("string")
    .systemDiskKmsId("string")
    .systemDiskSize(0)
    .systemDiskType("string")
    .tags(Map.of("string", "string"))
    .timeouts(EcsInstanceV1TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .userData("string")
    .availabilityZone("string")
    .build());
Copy
ecs_instance_v1_resource = opentelekomcloud.EcsInstanceV1("ecsInstanceV1Resource",
    flavor="string",
    vpc_id="string",
    nics=[{
        "network_id": "string",
        "ip_address": "string",
        "mac_address": "string",
        "port_id": "string",
        "type": "string",
    }],
    image_id="string",
    os_scheduler_hints=[{
        "dedicated_host_id": "string",
        "group": "string",
        "tenancy": "string",
    }],
    password="string",
    delete_disks_on_termination=False,
    key_name="string",
    name="string",
    data_disks=[{
        "size": 0,
        "type": "string",
        "id": "string",
        "kms_id": "string",
        "snapshot_id": "string",
    }],
    auto_recovery=False,
    ecs_instance_v1_id="string",
    security_groups=["string"],
    system_disk_kms_id="string",
    system_disk_size=0,
    system_disk_type="string",
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    },
    user_data="string",
    availability_zone="string")
Copy
const ecsInstanceV1Resource = new opentelekomcloud.EcsInstanceV1("ecsInstanceV1Resource", {
    flavor: "string",
    vpcId: "string",
    nics: [{
        networkId: "string",
        ipAddress: "string",
        macAddress: "string",
        portId: "string",
        type: "string",
    }],
    imageId: "string",
    osSchedulerHints: [{
        dedicatedHostId: "string",
        group: "string",
        tenancy: "string",
    }],
    password: "string",
    deleteDisksOnTermination: false,
    keyName: "string",
    name: "string",
    dataDisks: [{
        size: 0,
        type: "string",
        id: "string",
        kmsId: "string",
        snapshotId: "string",
    }],
    autoRecovery: false,
    ecsInstanceV1Id: "string",
    securityGroups: ["string"],
    systemDiskKmsId: "string",
    systemDiskSize: 0,
    systemDiskType: "string",
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
    userData: "string",
    availabilityZone: "string",
});
Copy
type: opentelekomcloud:EcsInstanceV1
properties:
    autoRecovery: false
    availabilityZone: string
    dataDisks:
        - id: string
          kmsId: string
          size: 0
          snapshotId: string
          type: string
    deleteDisksOnTermination: false
    ecsInstanceV1Id: string
    flavor: string
    imageId: string
    keyName: string
    name: string
    nics:
        - ipAddress: string
          macAddress: string
          networkId: string
          portId: string
          type: string
    osSchedulerHints:
        - dedicatedHostId: string
          group: string
          tenancy: string
    password: string
    securityGroups:
        - string
    systemDiskKmsId: string
    systemDiskSize: 0
    systemDiskType: string
    tags:
        string: string
    timeouts:
        create: string
        delete: string
        update: string
    userData: string
    vpcId: string
Copy

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

Flavor This property is required. string
The name of the desired flavor for the server.
ImageId This property is required. string
The ID of the desired image for the server. Changing this creates a new server.
Nics This property is required. List<EcsInstanceV1Nic>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
VpcId This property is required. string
The ID of the desired VPC for the server. Changing this creates a new server.
AutoRecovery bool
Whether configure automatic recovery of an instance.
AvailabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

DataDisks List<EcsInstanceV1DataDisk>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
DeleteDisksOnTermination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
EcsInstanceV1Id string
KeyName 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.
Name string
A unique name for the instance.
OsSchedulerHints List<EcsInstanceV1OsSchedulerHint>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
Password string
The administrative password to assign to the server. Changing this creates a new server.
SecurityGroups List<string>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
SystemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
SystemDiskSize double
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
SystemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Tags Dictionary<string, string>
Tags key/value pairs to associate with the instance.
Timeouts EcsInstanceV1Timeouts
UserData string
The user data to provide when launching the instance. Changing this creates a new server.
Flavor This property is required. string
The name of the desired flavor for the server.
ImageId This property is required. string
The ID of the desired image for the server. Changing this creates a new server.
Nics This property is required. []EcsInstanceV1NicArgs
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
VpcId This property is required. string
The ID of the desired VPC for the server. Changing this creates a new server.
AutoRecovery bool
Whether configure automatic recovery of an instance.
AvailabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

DataDisks []EcsInstanceV1DataDiskArgs
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
DeleteDisksOnTermination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
EcsInstanceV1Id string
KeyName 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.
Name string
A unique name for the instance.
OsSchedulerHints []EcsInstanceV1OsSchedulerHintArgs
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
Password string
The administrative password to assign to the server. Changing this creates a new server.
SecurityGroups []string
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
SystemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
SystemDiskSize float64
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
SystemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Tags map[string]string
Tags key/value pairs to associate with the instance.
Timeouts EcsInstanceV1TimeoutsArgs
UserData string
The user data to provide when launching the instance. Changing this creates a new server.
flavor This property is required. String
The name of the desired flavor for the server.
imageId This property is required. String
The ID of the desired image for the server. Changing this creates a new server.
nics This property is required. List<EcsInstanceV1Nic>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
vpcId This property is required. String
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery Boolean
Whether configure automatic recovery of an instance.
availabilityZone String

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks List<EcsInstanceV1DataDisk>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination Boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id String
keyName 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.
name String
A unique name for the instance.
osSchedulerHints List<EcsInstanceV1OsSchedulerHint>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password String
The administrative password to assign to the server. Changing this creates a new server.
securityGroups List<String>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskKmsId String
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize Double
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType String

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags Map<String,String>
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1Timeouts
userData String
The user data to provide when launching the instance. Changing this creates a new server.
flavor This property is required. string
The name of the desired flavor for the server.
imageId This property is required. string
The ID of the desired image for the server. Changing this creates a new server.
nics This property is required. EcsInstanceV1Nic[]
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
vpcId This property is required. string
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery boolean
Whether configure automatic recovery of an instance.
availabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks EcsInstanceV1DataDisk[]
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id string
keyName 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.
name string
A unique name for the instance.
osSchedulerHints EcsInstanceV1OsSchedulerHint[]
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password string
The administrative password to assign to the server. Changing this creates a new server.
securityGroups string[]
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize number
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags {[key: string]: string}
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1Timeouts
userData string
The user data to provide when launching the instance. Changing this creates a new server.
flavor This property is required. str
The name of the desired flavor for the server.
image_id This property is required. str
The ID of the desired image for the server. Changing this creates a new server.
nics This property is required. Sequence[EcsInstanceV1NicArgs]
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
vpc_id This property is required. str
The ID of the desired VPC for the server. Changing this creates a new server.
auto_recovery bool
Whether configure automatic recovery of an instance.
availability_zone str

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

data_disks Sequence[EcsInstanceV1DataDiskArgs]
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
delete_disks_on_termination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecs_instance_v1_id str
key_name 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.
name str
A unique name for the instance.
os_scheduler_hints Sequence[EcsInstanceV1OsSchedulerHintArgs]
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password str
The administrative password to assign to the server. Changing this creates a new server.
security_groups Sequence[str]
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
system_disk_kms_id str
The Encryption KMS ID of the system disk. Changing this creates a new server.
system_disk_size float
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
system_disk_type str

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags Mapping[str, str]
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1TimeoutsArgs
user_data str
The user data to provide when launching the instance. Changing this creates a new server.
flavor This property is required. String
The name of the desired flavor for the server.
imageId This property is required. String
The ID of the desired image for the server. Changing this creates a new server.
nics This property is required. List<Property Map>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
vpcId This property is required. String
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery Boolean
Whether configure automatic recovery of an instance.
availabilityZone String

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks List<Property Map>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination Boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id String
keyName 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.
name String
A unique name for the instance.
osSchedulerHints List<Property Map>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password String
The administrative password to assign to the server. Changing this creates a new server.
securityGroups List<String>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskKmsId String
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize Number
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType String

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

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 EcsInstanceV1 resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
SystemDiskId string
(String) The ID of the system disk.
VolumesAttacheds List<EcsInstanceV1VolumesAttached>
Id string
The provider-assigned unique ID for this managed resource.
SystemDiskId string
(String) The ID of the system disk.
VolumesAttacheds []EcsInstanceV1VolumesAttached
id String
The provider-assigned unique ID for this managed resource.
systemDiskId String
(String) The ID of the system disk.
volumesAttacheds List<EcsInstanceV1VolumesAttached>
id string
The provider-assigned unique ID for this managed resource.
systemDiskId string
(String) The ID of the system disk.
volumesAttacheds EcsInstanceV1VolumesAttached[]
id str
The provider-assigned unique ID for this managed resource.
system_disk_id str
(String) The ID of the system disk.
volumes_attacheds Sequence[EcsInstanceV1VolumesAttached]
id String
The provider-assigned unique ID for this managed resource.
systemDiskId String
(String) The ID of the system disk.
volumesAttacheds List<Property Map>

Look up Existing EcsInstanceV1 Resource

Get an existing EcsInstanceV1 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?: EcsInstanceV1State, opts?: CustomResourceOptions): EcsInstanceV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_recovery: Optional[bool] = None,
        availability_zone: Optional[str] = None,
        data_disks: Optional[Sequence[EcsInstanceV1DataDiskArgs]] = None,
        delete_disks_on_termination: Optional[bool] = None,
        ecs_instance_v1_id: Optional[str] = None,
        flavor: Optional[str] = None,
        image_id: Optional[str] = None,
        key_name: Optional[str] = None,
        name: Optional[str] = None,
        nics: Optional[Sequence[EcsInstanceV1NicArgs]] = None,
        os_scheduler_hints: Optional[Sequence[EcsInstanceV1OsSchedulerHintArgs]] = None,
        password: Optional[str] = None,
        security_groups: Optional[Sequence[str]] = None,
        system_disk_id: Optional[str] = None,
        system_disk_kms_id: Optional[str] = None,
        system_disk_size: Optional[float] = None,
        system_disk_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        timeouts: Optional[EcsInstanceV1TimeoutsArgs] = None,
        user_data: Optional[str] = None,
        volumes_attacheds: Optional[Sequence[EcsInstanceV1VolumesAttachedArgs]] = None,
        vpc_id: Optional[str] = None) -> EcsInstanceV1
func GetEcsInstanceV1(ctx *Context, name string, id IDInput, state *EcsInstanceV1State, opts ...ResourceOption) (*EcsInstanceV1, error)
public static EcsInstanceV1 Get(string name, Input<string> id, EcsInstanceV1State? state, CustomResourceOptions? opts = null)
public static EcsInstanceV1 get(String name, Output<String> id, EcsInstanceV1State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:EcsInstanceV1    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutoRecovery bool
Whether configure automatic recovery of an instance.
AvailabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

DataDisks List<EcsInstanceV1DataDisk>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
DeleteDisksOnTermination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
EcsInstanceV1Id string
Flavor string
The name of the desired flavor for the server.
ImageId string
The ID of the desired image for the server. Changing this creates a new server.
KeyName 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.
Name string
A unique name for the instance.
Nics List<EcsInstanceV1Nic>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
OsSchedulerHints List<EcsInstanceV1OsSchedulerHint>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
Password string
The administrative password to assign to the server. Changing this creates a new server.
SecurityGroups List<string>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
SystemDiskId string
(String) The ID of the system disk.
SystemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
SystemDiskSize double
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
SystemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Tags Dictionary<string, string>
Tags key/value pairs to associate with the instance.
Timeouts EcsInstanceV1Timeouts
UserData string
The user data to provide when launching the instance. Changing this creates a new server.
VolumesAttacheds List<EcsInstanceV1VolumesAttached>
VpcId string
The ID of the desired VPC for the server. Changing this creates a new server.
AutoRecovery bool
Whether configure automatic recovery of an instance.
AvailabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

DataDisks []EcsInstanceV1DataDiskArgs
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
DeleteDisksOnTermination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
EcsInstanceV1Id string
Flavor string
The name of the desired flavor for the server.
ImageId string
The ID of the desired image for the server. Changing this creates a new server.
KeyName 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.
Name string
A unique name for the instance.
Nics []EcsInstanceV1NicArgs
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
OsSchedulerHints []EcsInstanceV1OsSchedulerHintArgs
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
Password string
The administrative password to assign to the server. Changing this creates a new server.
SecurityGroups []string
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
SystemDiskId string
(String) The ID of the system disk.
SystemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
SystemDiskSize float64
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
SystemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Tags map[string]string
Tags key/value pairs to associate with the instance.
Timeouts EcsInstanceV1TimeoutsArgs
UserData string
The user data to provide when launching the instance. Changing this creates a new server.
VolumesAttacheds []EcsInstanceV1VolumesAttachedArgs
VpcId string
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery Boolean
Whether configure automatic recovery of an instance.
availabilityZone String

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks List<EcsInstanceV1DataDisk>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination Boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id String
flavor String
The name of the desired flavor for the server.
imageId String
The ID of the desired image for the server. Changing this creates a new server.
keyName 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.
name String
A unique name for the instance.
nics List<EcsInstanceV1Nic>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
osSchedulerHints List<EcsInstanceV1OsSchedulerHint>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password String
The administrative password to assign to the server. Changing this creates a new server.
securityGroups List<String>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskId String
(String) The ID of the system disk.
systemDiskKmsId String
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize Double
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType String

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags Map<String,String>
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1Timeouts
userData String
The user data to provide when launching the instance. Changing this creates a new server.
volumesAttacheds List<EcsInstanceV1VolumesAttached>
vpcId String
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery boolean
Whether configure automatic recovery of an instance.
availabilityZone string

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks EcsInstanceV1DataDisk[]
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id string
flavor string
The name of the desired flavor for the server.
imageId string
The ID of the desired image for the server. Changing this creates a new server.
keyName 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.
name string
A unique name for the instance.
nics EcsInstanceV1Nic[]
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
osSchedulerHints EcsInstanceV1OsSchedulerHint[]
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password string
The administrative password to assign to the server. Changing this creates a new server.
securityGroups string[]
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskId string
(String) The ID of the system disk.
systemDiskKmsId string
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize number
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType string

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags {[key: string]: string}
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1Timeouts
userData string
The user data to provide when launching the instance. Changing this creates a new server.
volumesAttacheds EcsInstanceV1VolumesAttached[]
vpcId string
The ID of the desired VPC for the server. Changing this creates a new server.
auto_recovery bool
Whether configure automatic recovery of an instance.
availability_zone str

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

data_disks Sequence[EcsInstanceV1DataDiskArgs]
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
delete_disks_on_termination bool
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecs_instance_v1_id str
flavor str
The name of the desired flavor for the server.
image_id str
The ID of the desired image for the server. Changing this creates a new server.
key_name 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.
name str
A unique name for the instance.
nics Sequence[EcsInstanceV1NicArgs]
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
os_scheduler_hints Sequence[EcsInstanceV1OsSchedulerHintArgs]
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password str
The administrative password to assign to the server. Changing this creates a new server.
security_groups Sequence[str]
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
system_disk_id str
(String) The ID of the system disk.
system_disk_kms_id str
The Encryption KMS ID of the system disk. Changing this creates a new server.
system_disk_size float
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
system_disk_type str

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

tags Mapping[str, str]
Tags key/value pairs to associate with the instance.
timeouts EcsInstanceV1TimeoutsArgs
user_data str
The user data to provide when launching the instance. Changing this creates a new server.
volumes_attacheds Sequence[EcsInstanceV1VolumesAttachedArgs]
vpc_id str
The ID of the desired VPC for the server. Changing this creates a new server.
autoRecovery Boolean
Whether configure automatic recovery of an instance.
availabilityZone String

The availability zone in which to create the server.

NOTE: If this parameter is not specified, the system automatically selects an AZ.

Changing this creates a new server.

dataDisks List<Property Map>
An array of one or more data disks to attach to the instance. The data_disks object structure is documented below. Changing this creates a new server.
deleteDisksOnTermination Boolean
Delete the data disks upon termination of the instance. Defaults to false. Changing this creates a new server.
ecsInstanceV1Id String
flavor String
The name of the desired flavor for the server.
imageId String
The ID of the desired image for the server. Changing this creates a new server.
keyName 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.
name String
A unique name for the instance.
nics List<Property Map>
An array of one or more networks to attach to the instance. The nics object structure is documented below. Changing this creates a new server.
osSchedulerHints List<Property Map>
Schedules ECSs, for example, by configuring an ECS group. The os_scheduler_hints object structure is documented below. Changing this creates a new server.
password String
The administrative password to assign to the server. Changing this creates a new server.
securityGroups List<String>
An array of one or more security group IDs to associate with the server. If this parameter is left blank, the default security group is bound to the ECS by default.
systemDiskId String
(String) The ID of the system disk.
systemDiskKmsId String
The Encryption KMS ID of the system disk. Changing this creates a new server.
systemDiskSize Number
The system disk size in GB, The value range is 1 to 1024. Changing this creates a new server.
systemDiskType String

The system disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

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.
volumesAttacheds List<Property Map>
vpcId String
The ID of the desired VPC for the server. Changing this creates a new server.

Supporting Types

EcsInstanceV1DataDisk
, EcsInstanceV1DataDiskArgs

Size This property is required. double
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
Type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Id string
KmsId string
The Encryption KMS ID of the data disk. Changing this creates a new server.
SnapshotId string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
Size This property is required. float64
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
Type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Id string
KmsId string
The Encryption KMS ID of the data disk. Changing this creates a new server.
SnapshotId string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
size This property is required. Double
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
type This property is required. String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id String
kmsId String
The Encryption KMS ID of the data disk. Changing this creates a new server.
snapshotId String
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
size This property is required. number
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id string
kmsId string
The Encryption KMS ID of the data disk. Changing this creates a new server.
snapshotId string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
size This property is required. float
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
type This property is required. str

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id str
kms_id str
The Encryption KMS ID of the data disk. Changing this creates a new server.
snapshot_id str
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
size This property is required. Number
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
type This property is required. String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id String
kmsId String
The Encryption KMS ID of the data disk. Changing this creates a new server.
snapshotId String
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.

EcsInstanceV1Nic
, EcsInstanceV1NicArgs

NetworkId This property is required. string
The network UUID to attach to the server. Changing this creates a new server.
IpAddress string
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
MacAddress string
PortId string
Type string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

NetworkId This property is required. string
The network UUID to attach to the server. Changing this creates a new server.
IpAddress string
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
MacAddress string
PortId string
Type string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

networkId This property is required. String
The network UUID to attach to the server. Changing this creates a new server.
ipAddress String
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
macAddress String
portId String
type String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

networkId This property is required. string
The network UUID to attach to the server. Changing this creates a new server.
ipAddress string
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
macAddress string
portId string
type string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

network_id This property is required. str
The network UUID to attach to the server. Changing this creates a new server.
ip_address str
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
mac_address str
port_id str
type str

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

networkId This property is required. String
The network UUID to attach to the server. Changing this creates a new server.
ipAddress String
Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
macAddress String
portId String
type String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

EcsInstanceV1OsSchedulerHint
, EcsInstanceV1OsSchedulerHintArgs

DedicatedHostId string
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
Group string
Specifies the ECS group ID in UUID format.
Tenancy string
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.
DedicatedHostId string
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
Group string
Specifies the ECS group ID in UUID format.
Tenancy string
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.
dedicatedHostId String
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
group String
Specifies the ECS group ID in UUID format.
tenancy String
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.
dedicatedHostId string
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
group string
Specifies the ECS group ID in UUID format.
tenancy string
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.
dedicated_host_id str
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
group str
Specifies the ECS group ID in UUID format.
tenancy str
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.
dedicatedHostId String
Specifies the dedicated host ID. A Dedicated Host ID takes effect only when tenancy is set to dedicated.
group String
Specifies the ECS group ID in UUID format.
tenancy String
Creates ECSs on a dedicated or shared host. Available options are: dedicated or shared.

EcsInstanceV1Timeouts
, EcsInstanceV1TimeoutsArgs

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

EcsInstanceV1VolumesAttached
, EcsInstanceV1VolumesAttachedArgs

Id This property is required. string
KmsId This property is required. string
The Encryption KMS ID of the data disk. Changing this creates a new server.
Size This property is required. double
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
SnapshotId This property is required. string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
Type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Id This property is required. string
KmsId This property is required. string
The Encryption KMS ID of the data disk. Changing this creates a new server.
Size This property is required. float64
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
SnapshotId This property is required. string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
Type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id This property is required. String
kmsId This property is required. String
The Encryption KMS ID of the data disk. Changing this creates a new server.
size This property is required. Double
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
snapshotId This property is required. String
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
type This property is required. String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id This property is required. string
kmsId This property is required. string
The Encryption KMS ID of the data disk. Changing this creates a new server.
size This property is required. number
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
snapshotId This property is required. string
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
type This property is required. string

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id This property is required. str
kms_id This property is required. str
The Encryption KMS ID of the data disk. Changing this creates a new server.
size This property is required. float
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
snapshot_id This property is required. str
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
type This property is required. str

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

id This property is required. String
kmsId This property is required. String
The Encryption KMS ID of the data disk. Changing this creates a new server.
size This property is required. Number
The size of the data disk in GB. The value range is 10 to 32768. Changing this creates a new server.
snapshotId This property is required. String
Specifies the snapshot ID or ID of the original data disk contained in the full-ECS image. Changing this creates a new server.
type This property is required. String

The data disk type of the server. For HANA, HL1, and HL2 ECSs use co-p1 and uh-l1 disks. Changing this creates a new server. Options are limited depending on AZ. Available options are:

  • SATA: common I/O disk type. Available for all AZs.
  • SAS: high I/O disk type. Available for all AZs.
  • SSD: ultra-high I/O disk type. Available for all AZs.
  • co-p1: high I/O(performance-optimized) disk type.
  • uh-l1: ultra-high I/O(latency-optimized) disk type.
  • ESSD: extreme SSD disk type.

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

Import

Instances can be imported using the id, e.g.

$ pulumi import opentelekomcloud:index/ecsInstanceV1:EcsInstanceV1 instance_1 d90ce693-5ccf-4136-a0ed-152ce412b6b9
Copy

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

Package Details

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