1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. InstanceV2
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

edgecenter.InstanceV2

Explore with Pulumi AI

A cloud instance is a virtual machine in a cloud environment.

Example Usage

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

const config = new pulumi.Config();
const regionId = config.getNumber("regionId") || 1;
const projectId = config.getNumber("projectId") || 1;
const imageId = config.get("imageId") || "f4ce3d30-e29c-4cfd-811f-46f383b6081f";
const network = new edgecenter.Network("network", {
    type: "vxlan",
    regionId: regionId,
    projectId: projectId,
});
const subnet = new edgecenter.Subnet("subnet", {
    cidr: "192.168.10.0/24",
    networkId: network.networkId,
    dnsNameservers: [
        "8.8.4.4",
        "1.1.1.1",
    ],
    hostRoutes: [{
        destination: "10.0.3.0/24",
        nexthop: "10.0.0.13",
    }],
    gatewayIp: "192.168.10.1",
    regionId: regionId,
    projectId: projectId,
});
const firstVolume = new edgecenter.Volume("firstVolume", {
    typeName: "ssd_hiiops",
    size: 5,
    regionId: regionId,
    projectId: projectId,
    imageId: imageId,
});
const secondVolume = new edgecenter.Volume("secondVolume", {
    typeName: "ssd_hiiops",
    size: 5,
    regionId: regionId,
    projectId: projectId,
});
const sg = new edgecenter.Securitygroup("sg", {
    regionId: regionId,
    projectId: projectId,
    securityGroupRules: [{
        direction: "egress",
        ethertype: "IPv4",
        protocol: "tcp",
        portRangeMin: 19990,
        portRangeMax: 19990,
    }],
});
const instance = new edgecenter.InstanceV2("instance", {
    flavorId: "g1-standard-2-4",
    bootVolumes: [{
        volumeId: firstVolume.volumeId,
        bootIndex: 0,
    }],
    dataVolumes: [{
        volumeId: secondVolume.volumeId,
    }],
    interfaces: [{
        isDefault: true,
        type: "subnet",
        networkId: network.networkId,
        subnetId: subnet.subnetId,
    }],
    metadata: {
        some_key: "some_value",
        stage: "dev",
    },
    configurations: [{
        key: "some_key",
        value: "some_data",
    }],
    regionId: regionId,
    projectId: projectId,
});
const portSecurity = new edgecenter.InstancePortSecurity("portSecurity", {
    portId: pulumi.all([instance.interfaces, subnet.subnetId]).apply(([interfaces, subnetId]) => interfaces.filter(iface => iface.subnetId == subnetId).map(iface => (iface.portId))[0]),
    instanceId: instance.instanceV2Id,
    regionId: regionId,
    projectId: projectId,
    portSecurityDisabled: false,
    securityGroups: {
        overwriteExisting: true,
        securityGroupIds: [sg.securitygroupId],
    },
});
Copy
import pulumi
import pulumi_edgecenter as edgecenter

config = pulumi.Config()
region_id = config.get_float("regionId")
if region_id is None:
    region_id = 1
project_id = config.get_float("projectId")
if project_id is None:
    project_id = 1
image_id = config.get("imageId")
if image_id is None:
    image_id = "f4ce3d30-e29c-4cfd-811f-46f383b6081f"
network = edgecenter.Network("network",
    type="vxlan",
    region_id=region_id,
    project_id=project_id)
subnet = edgecenter.Subnet("subnet",
    cidr="192.168.10.0/24",
    network_id=network.network_id,
    dns_nameservers=[
        "8.8.4.4",
        "1.1.1.1",
    ],
    host_routes=[{
        "destination": "10.0.3.0/24",
        "nexthop": "10.0.0.13",
    }],
    gateway_ip="192.168.10.1",
    region_id=region_id,
    project_id=project_id)
first_volume = edgecenter.Volume("firstVolume",
    type_name="ssd_hiiops",
    size=5,
    region_id=region_id,
    project_id=project_id,
    image_id=image_id)
second_volume = edgecenter.Volume("secondVolume",
    type_name="ssd_hiiops",
    size=5,
    region_id=region_id,
    project_id=project_id)
sg = edgecenter.Securitygroup("sg",
    region_id=region_id,
    project_id=project_id,
    security_group_rules=[{
        "direction": "egress",
        "ethertype": "IPv4",
        "protocol": "tcp",
        "port_range_min": 19990,
        "port_range_max": 19990,
    }])
instance = edgecenter.InstanceV2("instance",
    flavor_id="g1-standard-2-4",
    boot_volumes=[{
        "volume_id": first_volume.volume_id,
        "boot_index": 0,
    }],
    data_volumes=[{
        "volume_id": second_volume.volume_id,
    }],
    interfaces=[{
        "is_default": True,
        "type": "subnet",
        "network_id": network.network_id,
        "subnet_id": subnet.subnet_id,
    }],
    metadata={
        "some_key": "some_value",
        "stage": "dev",
    },
    configurations=[{
        "key": "some_key",
        "value": "some_data",
    }],
    region_id=region_id,
    project_id=project_id)
port_security = edgecenter.InstancePortSecurity("portSecurity",
    port_id=pulumi.Output.all(
        interfaces=instance.interfaces,
        subnet_id=subnet.subnet_id
).apply(lambda resolved_outputs: [iface.port_id for iface in resolved_outputs['interfaces'] if iface.subnet_id == resolved_outputs['subnet_id']][0])
,
    instance_id=instance.instance_v2_id,
    region_id=region_id,
    project_id=project_id,
    port_security_disabled=False,
    security_groups={
        "overwrite_existing": True,
        "security_group_ids": [sg.securitygroup_id],
    })
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		regionId := float64(1)
		if param := cfg.GetFloat64("regionId"); param != 0 {
			regionId = param
		}
		projectId := float64(1)
		if param := cfg.GetFloat64("projectId"); param != 0 {
			projectId = param
		}
		imageId := "f4ce3d30-e29c-4cfd-811f-46f383b6081f"
		if param := cfg.Get("imageId"); param != "" {
			imageId = param
		}
		network, err := edgecenter.NewNetwork(ctx, "network", &edgecenter.NetworkArgs{
			Type:      pulumi.String("vxlan"),
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
		})
		if err != nil {
			return err
		}
		subnet, err := edgecenter.NewSubnet(ctx, "subnet", &edgecenter.SubnetArgs{
			Cidr:      pulumi.String("192.168.10.0/24"),
			NetworkId: network.NetworkId,
			DnsNameservers: pulumi.StringArray{
				pulumi.String("8.8.4.4"),
				pulumi.String("1.1.1.1"),
			},
			HostRoutes: edgecenter.SubnetHostRouteArray{
				&edgecenter.SubnetHostRouteArgs{
					Destination: pulumi.String("10.0.3.0/24"),
					Nexthop:     pulumi.String("10.0.0.13"),
				},
			},
			GatewayIp: pulumi.String("192.168.10.1"),
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
		})
		if err != nil {
			return err
		}
		firstVolume, err := edgecenter.NewVolume(ctx, "firstVolume", &edgecenter.VolumeArgs{
			TypeName:  pulumi.String("ssd_hiiops"),
			Size:      pulumi.Float64(5),
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
			ImageId:   pulumi.String(imageId),
		})
		if err != nil {
			return err
		}
		secondVolume, err := edgecenter.NewVolume(ctx, "secondVolume", &edgecenter.VolumeArgs{
			TypeName:  pulumi.String("ssd_hiiops"),
			Size:      pulumi.Float64(5),
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
		})
		if err != nil {
			return err
		}
		sg, err := edgecenter.NewSecuritygroup(ctx, "sg", &edgecenter.SecuritygroupArgs{
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
			SecurityGroupRules: edgecenter.SecuritygroupSecurityGroupRuleArray{
				&edgecenter.SecuritygroupSecurityGroupRuleArgs{
					Direction:    pulumi.String("egress"),
					Ethertype:    pulumi.String("IPv4"),
					Protocol:     pulumi.String("tcp"),
					PortRangeMin: pulumi.Float64(19990),
					PortRangeMax: pulumi.Float64(19990),
				},
			},
		})
		if err != nil {
			return err
		}
		instance, err := edgecenter.NewInstanceV2(ctx, "instance", &edgecenter.InstanceV2Args{
			FlavorId: pulumi.String("g1-standard-2-4"),
			BootVolumes: edgecenter.InstanceV2BootVolumeArray{
				&edgecenter.InstanceV2BootVolumeArgs{
					VolumeId:  firstVolume.VolumeId,
					BootIndex: pulumi.Float64(0),
				},
			},
			DataVolumes: edgecenter.InstanceV2DataVolumeArray{
				&edgecenter.InstanceV2DataVolumeArgs{
					VolumeId: secondVolume.VolumeId,
				},
			},
			Interfaces: edgecenter.InstanceV2InterfaceArray{
				&edgecenter.InstanceV2InterfaceArgs{
					IsDefault: pulumi.Bool(true),
					Type:      pulumi.String("subnet"),
					NetworkId: network.NetworkId,
					SubnetId:  subnet.SubnetId,
				},
			},
			Metadata: pulumi.StringMap{
				"some_key": pulumi.String("some_value"),
				"stage":    pulumi.String("dev"),
			},
			Configurations: edgecenter.InstanceV2ConfigurationArray{
				&edgecenter.InstanceV2ConfigurationArgs{
					Key:   pulumi.String("some_key"),
					Value: pulumi.String("some_data"),
				},
			},
			RegionId:  pulumi.Float64(regionId),
			ProjectId: pulumi.Float64(projectId),
		})
		if err != nil {
			return err
		}
		_, err = edgecenter.NewInstancePortSecurity(ctx, "portSecurity", &edgecenter.InstancePortSecurityArgs{
			PortId: pulumi.String(pulumi.All(instance.Interfaces, subnet.SubnetId).ApplyT(func(_args []interface{}) (*string, error) {
				interfaces := _args[0].([]edgecenter.InstanceV2Interface)
				subnetId := _args[1].(string)
				return "TODO: For expression"[0], nil
			}).(pulumi.StringPtrOutput)),
			InstanceId:           instance.InstanceV2Id,
			RegionId:             pulumi.Float64(regionId),
			ProjectId:            pulumi.Float64(projectId),
			PortSecurityDisabled: pulumi.Bool(false),
			SecurityGroups: &edgecenter.InstancePortSecuritySecurityGroupsArgs{
				OverwriteExisting: pulumi.Bool(true),
				SecurityGroupIds: pulumi.StringArray{
					sg.SecuritygroupId,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var regionId = config.GetDouble("regionId") ?? 1;
    var projectId = config.GetDouble("projectId") ?? 1;
    var imageId = config.Get("imageId") ?? "f4ce3d30-e29c-4cfd-811f-46f383b6081f";
    var network = new Edgecenter.Network("network", new()
    {
        Type = "vxlan",
        RegionId = regionId,
        ProjectId = projectId,
    });

    var subnet = new Edgecenter.Subnet("subnet", new()
    {
        Cidr = "192.168.10.0/24",
        NetworkId = network.NetworkId,
        DnsNameservers = new[]
        {
            "8.8.4.4",
            "1.1.1.1",
        },
        HostRoutes = new[]
        {
            new Edgecenter.Inputs.SubnetHostRouteArgs
            {
                Destination = "10.0.3.0/24",
                Nexthop = "10.0.0.13",
            },
        },
        GatewayIp = "192.168.10.1",
        RegionId = regionId,
        ProjectId = projectId,
    });

    var firstVolume = new Edgecenter.Volume("firstVolume", new()
    {
        TypeName = "ssd_hiiops",
        Size = 5,
        RegionId = regionId,
        ProjectId = projectId,
        ImageId = imageId,
    });

    var secondVolume = new Edgecenter.Volume("secondVolume", new()
    {
        TypeName = "ssd_hiiops",
        Size = 5,
        RegionId = regionId,
        ProjectId = projectId,
    });

    var sg = new Edgecenter.Securitygroup("sg", new()
    {
        RegionId = regionId,
        ProjectId = projectId,
        SecurityGroupRules = new[]
        {
            new Edgecenter.Inputs.SecuritygroupSecurityGroupRuleArgs
            {
                Direction = "egress",
                Ethertype = "IPv4",
                Protocol = "tcp",
                PortRangeMin = 19990,
                PortRangeMax = 19990,
            },
        },
    });

    var instance = new Edgecenter.InstanceV2("instance", new()
    {
        FlavorId = "g1-standard-2-4",
        BootVolumes = new[]
        {
            new Edgecenter.Inputs.InstanceV2BootVolumeArgs
            {
                VolumeId = firstVolume.VolumeId,
                BootIndex = 0,
            },
        },
        DataVolumes = new[]
        {
            new Edgecenter.Inputs.InstanceV2DataVolumeArgs
            {
                VolumeId = secondVolume.VolumeId,
            },
        },
        Interfaces = new[]
        {
            new Edgecenter.Inputs.InstanceV2InterfaceArgs
            {
                IsDefault = true,
                Type = "subnet",
                NetworkId = network.NetworkId,
                SubnetId = subnet.SubnetId,
            },
        },
        Metadata = 
        {
            { "some_key", "some_value" },
            { "stage", "dev" },
        },
        Configurations = new[]
        {
            new Edgecenter.Inputs.InstanceV2ConfigurationArgs
            {
                Key = "some_key",
                Value = "some_data",
            },
        },
        RegionId = regionId,
        ProjectId = projectId,
    });

    var portSecurity = new Edgecenter.InstancePortSecurity("portSecurity", new()
    {
        PortId = Output.Tuple(instance.Interfaces, subnet.SubnetId).Apply(values =>
        {
            var interfaces = values.Item1;
            var subnetId = values.Item2;
            return interfaces.Where(iface => iface.SubnetId == subnetId).Select(iface => 
            {
                return iface.PortId;
            }).ToList()[0];
        }),
        InstanceId = instance.InstanceV2Id,
        RegionId = regionId,
        ProjectId = projectId,
        PortSecurityDisabled = false,
        SecurityGroups = new Edgecenter.Inputs.InstancePortSecuritySecurityGroupsArgs
        {
            OverwriteExisting = true,
            SecurityGroupIds = new[]
            {
                sg.SecuritygroupId,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.Network;
import com.pulumi.edgecenter.NetworkArgs;
import com.pulumi.edgecenter.Subnet;
import com.pulumi.edgecenter.SubnetArgs;
import com.pulumi.edgecenter.inputs.SubnetHostRouteArgs;
import com.pulumi.edgecenter.Volume;
import com.pulumi.edgecenter.VolumeArgs;
import com.pulumi.edgecenter.Securitygroup;
import com.pulumi.edgecenter.SecuritygroupArgs;
import com.pulumi.edgecenter.inputs.SecuritygroupSecurityGroupRuleArgs;
import com.pulumi.edgecenter.InstanceV2;
import com.pulumi.edgecenter.InstanceV2Args;
import com.pulumi.edgecenter.inputs.InstanceV2BootVolumeArgs;
import com.pulumi.edgecenter.inputs.InstanceV2DataVolumeArgs;
import com.pulumi.edgecenter.inputs.InstanceV2InterfaceArgs;
import com.pulumi.edgecenter.inputs.InstanceV2ConfigurationArgs;
import com.pulumi.edgecenter.InstancePortSecurity;
import com.pulumi.edgecenter.InstancePortSecurityArgs;
import com.pulumi.edgecenter.inputs.InstancePortSecuritySecurityGroupsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var regionId = config.get("regionId").orElse(1);
        final var projectId = config.get("projectId").orElse(1);
        final var imageId = config.get("imageId").orElse("f4ce3d30-e29c-4cfd-811f-46f383b6081f");
        var network = new Network("network", NetworkArgs.builder()
            .type("vxlan")
            .regionId(regionId)
            .projectId(projectId)
            .build());

        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .cidr("192.168.10.0/24")
            .networkId(network.networkId())
            .dnsNameservers(            
                "8.8.4.4",
                "1.1.1.1")
            .hostRoutes(SubnetHostRouteArgs.builder()
                .destination("10.0.3.0/24")
                .nexthop("10.0.0.13")
                .build())
            .gatewayIp("192.168.10.1")
            .regionId(regionId)
            .projectId(projectId)
            .build());

        var firstVolume = new Volume("firstVolume", VolumeArgs.builder()
            .typeName("ssd_hiiops")
            .size(5)
            .regionId(regionId)
            .projectId(projectId)
            .imageId(imageId)
            .build());

        var secondVolume = new Volume("secondVolume", VolumeArgs.builder()
            .typeName("ssd_hiiops")
            .size(5)
            .regionId(regionId)
            .projectId(projectId)
            .build());

        var sg = new Securitygroup("sg", SecuritygroupArgs.builder()
            .regionId(regionId)
            .projectId(projectId)
            .securityGroupRules(SecuritygroupSecurityGroupRuleArgs.builder()
                .direction("egress")
                .ethertype("IPv4")
                .protocol("tcp")
                .portRangeMin(19990)
                .portRangeMax(19990)
                .build())
            .build());

        var instance = new InstanceV2("instance", InstanceV2Args.builder()
            .flavorId("g1-standard-2-4")
            .bootVolumes(InstanceV2BootVolumeArgs.builder()
                .volumeId(firstVolume.volumeId())
                .bootIndex(0)
                .build())
            .dataVolumes(InstanceV2DataVolumeArgs.builder()
                .volumeId(secondVolume.volumeId())
                .build())
            .interfaces(InstanceV2InterfaceArgs.builder()
                .isDefault(true)
                .type("subnet")
                .networkId(network.networkId())
                .subnetId(subnet.subnetId())
                .build())
            .metadata(Map.ofEntries(
                Map.entry("some_key", "some_value"),
                Map.entry("stage", "dev")
            ))
            .configurations(InstanceV2ConfigurationArgs.builder()
                .key("some_key")
                .value("some_data")
                .build())
            .regionId(regionId)
            .projectId(projectId)
            .build());

        var portSecurity = new InstancePortSecurity("portSecurity", InstancePortSecurityArgs.builder()
            .portId(Output.tuple(instance.interfaces(), subnet.subnetId()).applyValue(values -> {
                var interfaces = values.t1;
                var subnetId = values.t2;
                return "TODO: ForExpression"[0];
            }))
            .instanceId(instance.instanceV2Id())
            .regionId(regionId)
            .projectId(projectId)
            .portSecurityDisabled(false)
            .securityGroups(InstancePortSecuritySecurityGroupsArgs.builder()
                .overwriteExisting(true)
                .securityGroupIds(sg.securitygroupId())
                .build())
            .build());

    }
}
Copy
Coming soon!

Create InstanceV2 Resource

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

Constructor syntax

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

@overload
def InstanceV2(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               flavor_id: Optional[str] = None,
               boot_volumes: Optional[Sequence[InstanceV2BootVolumeArgs]] = None,
               interfaces: Optional[Sequence[InstanceV2InterfaceArgs]] = None,
               name_template: Optional[str] = None,
               project_id: Optional[float] = None,
               instance_v2_id: Optional[str] = None,
               configurations: Optional[Sequence[InstanceV2ConfigurationArgs]] = None,
               keypair_name: Optional[str] = None,
               metadata: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None,
               allow_app_ports: Optional[bool] = None,
               password: Optional[str] = None,
               data_volumes: Optional[Sequence[InstanceV2DataVolumeArgs]] = None,
               project_name: Optional[str] = None,
               region_id: Optional[float] = None,
               region_name: Optional[str] = None,
               server_group: Optional[str] = None,
               status: Optional[str] = None,
               user_data: Optional[str] = None,
               username: Optional[str] = None,
               vm_state: Optional[str] = None)
func NewInstanceV2(ctx *Context, name string, args InstanceV2Args, opts ...ResourceOption) (*InstanceV2, error)
public InstanceV2(string name, InstanceV2Args args, CustomResourceOptions? opts = null)
public InstanceV2(String name, InstanceV2Args args)
public InstanceV2(String name, InstanceV2Args args, CustomResourceOptions options)
type: edgecenter:InstanceV2
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. InstanceV2Args
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. InstanceV2Args
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. InstanceV2Args
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. InstanceV2Args
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. InstanceV2Args
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 instanceV2Resource = new Edgecenter.InstanceV2("instanceV2Resource", new()
{
    FlavorId = "string",
    BootVolumes = new[]
    {
        new Edgecenter.Inputs.InstanceV2BootVolumeArgs
        {
            BootIndex = 0,
            VolumeId = "string",
            AttachmentTag = "string",
            Name = "string",
            Size = 0,
            TypeName = "string",
        },
    },
    Interfaces = new[]
    {
        new Edgecenter.Inputs.InstanceV2InterfaceArgs
        {
            Type = "string",
            IpAddress = "string",
            IsDefault = false,
            NetworkId = "string",
            NetworkName = "string",
            PortId = "string",
            ReservedFixedIpPortId = "string",
            SubnetId = "string",
        },
    },
    NameTemplate = "string",
    ProjectId = 0,
    InstanceV2Id = "string",
    Configurations = new[]
    {
        new Edgecenter.Inputs.InstanceV2ConfigurationArgs
        {
            Key = "string",
            Value = "string",
        },
    },
    KeypairName = "string",
    Metadata = 
    {
        { "string", "string" },
    },
    Name = "string",
    AllowAppPorts = false,
    Password = "string",
    DataVolumes = new[]
    {
        new Edgecenter.Inputs.InstanceV2DataVolumeArgs
        {
            VolumeId = "string",
            AttachmentTag = "string",
            Name = "string",
            Size = 0,
            TypeName = "string",
        },
    },
    ProjectName = "string",
    RegionId = 0,
    RegionName = "string",
    ServerGroup = "string",
    Status = "string",
    UserData = "string",
    Username = "string",
    VmState = "string",
});
Copy
example, err := edgecenter.NewInstanceV2(ctx, "instanceV2Resource", &edgecenter.InstanceV2Args{
	FlavorId: pulumi.String("string"),
	BootVolumes: edgecenter.InstanceV2BootVolumeArray{
		&edgecenter.InstanceV2BootVolumeArgs{
			BootIndex:     pulumi.Float64(0),
			VolumeId:      pulumi.String("string"),
			AttachmentTag: pulumi.String("string"),
			Name:          pulumi.String("string"),
			Size:          pulumi.Float64(0),
			TypeName:      pulumi.String("string"),
		},
	},
	Interfaces: edgecenter.InstanceV2InterfaceArray{
		&edgecenter.InstanceV2InterfaceArgs{
			Type:                  pulumi.String("string"),
			IpAddress:             pulumi.String("string"),
			IsDefault:             pulumi.Bool(false),
			NetworkId:             pulumi.String("string"),
			NetworkName:           pulumi.String("string"),
			PortId:                pulumi.String("string"),
			ReservedFixedIpPortId: pulumi.String("string"),
			SubnetId:              pulumi.String("string"),
		},
	},
	NameTemplate: pulumi.String("string"),
	ProjectId:    pulumi.Float64(0),
	InstanceV2Id: pulumi.String("string"),
	Configurations: edgecenter.InstanceV2ConfigurationArray{
		&edgecenter.InstanceV2ConfigurationArgs{
			Key:   pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
	KeypairName: pulumi.String("string"),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:          pulumi.String("string"),
	AllowAppPorts: pulumi.Bool(false),
	Password:      pulumi.String("string"),
	DataVolumes: edgecenter.InstanceV2DataVolumeArray{
		&edgecenter.InstanceV2DataVolumeArgs{
			VolumeId:      pulumi.String("string"),
			AttachmentTag: pulumi.String("string"),
			Name:          pulumi.String("string"),
			Size:          pulumi.Float64(0),
			TypeName:      pulumi.String("string"),
		},
	},
	ProjectName: pulumi.String("string"),
	RegionId:    pulumi.Float64(0),
	RegionName:  pulumi.String("string"),
	ServerGroup: pulumi.String("string"),
	Status:      pulumi.String("string"),
	UserData:    pulumi.String("string"),
	Username:    pulumi.String("string"),
	VmState:     pulumi.String("string"),
})
Copy
var instanceV2Resource = new InstanceV2("instanceV2Resource", InstanceV2Args.builder()
    .flavorId("string")
    .bootVolumes(InstanceV2BootVolumeArgs.builder()
        .bootIndex(0)
        .volumeId("string")
        .attachmentTag("string")
        .name("string")
        .size(0)
        .typeName("string")
        .build())
    .interfaces(InstanceV2InterfaceArgs.builder()
        .type("string")
        .ipAddress("string")
        .isDefault(false)
        .networkId("string")
        .networkName("string")
        .portId("string")
        .reservedFixedIpPortId("string")
        .subnetId("string")
        .build())
    .nameTemplate("string")
    .projectId(0)
    .instanceV2Id("string")
    .configurations(InstanceV2ConfigurationArgs.builder()
        .key("string")
        .value("string")
        .build())
    .keypairName("string")
    .metadata(Map.of("string", "string"))
    .name("string")
    .allowAppPorts(false)
    .password("string")
    .dataVolumes(InstanceV2DataVolumeArgs.builder()
        .volumeId("string")
        .attachmentTag("string")
        .name("string")
        .size(0)
        .typeName("string")
        .build())
    .projectName("string")
    .regionId(0)
    .regionName("string")
    .serverGroup("string")
    .status("string")
    .userData("string")
    .username("string")
    .vmState("string")
    .build());
Copy
instance_v2_resource = edgecenter.InstanceV2("instanceV2Resource",
    flavor_id="string",
    boot_volumes=[{
        "boot_index": 0,
        "volume_id": "string",
        "attachment_tag": "string",
        "name": "string",
        "size": 0,
        "type_name": "string",
    }],
    interfaces=[{
        "type": "string",
        "ip_address": "string",
        "is_default": False,
        "network_id": "string",
        "network_name": "string",
        "port_id": "string",
        "reserved_fixed_ip_port_id": "string",
        "subnet_id": "string",
    }],
    name_template="string",
    project_id=0,
    instance_v2_id="string",
    configurations=[{
        "key": "string",
        "value": "string",
    }],
    keypair_name="string",
    metadata={
        "string": "string",
    },
    name="string",
    allow_app_ports=False,
    password="string",
    data_volumes=[{
        "volume_id": "string",
        "attachment_tag": "string",
        "name": "string",
        "size": 0,
        "type_name": "string",
    }],
    project_name="string",
    region_id=0,
    region_name="string",
    server_group="string",
    status="string",
    user_data="string",
    username="string",
    vm_state="string")
Copy
const instanceV2Resource = new edgecenter.InstanceV2("instanceV2Resource", {
    flavorId: "string",
    bootVolumes: [{
        bootIndex: 0,
        volumeId: "string",
        attachmentTag: "string",
        name: "string",
        size: 0,
        typeName: "string",
    }],
    interfaces: [{
        type: "string",
        ipAddress: "string",
        isDefault: false,
        networkId: "string",
        networkName: "string",
        portId: "string",
        reservedFixedIpPortId: "string",
        subnetId: "string",
    }],
    nameTemplate: "string",
    projectId: 0,
    instanceV2Id: "string",
    configurations: [{
        key: "string",
        value: "string",
    }],
    keypairName: "string",
    metadata: {
        string: "string",
    },
    name: "string",
    allowAppPorts: false,
    password: "string",
    dataVolumes: [{
        volumeId: "string",
        attachmentTag: "string",
        name: "string",
        size: 0,
        typeName: "string",
    }],
    projectName: "string",
    regionId: 0,
    regionName: "string",
    serverGroup: "string",
    status: "string",
    userData: "string",
    username: "string",
    vmState: "string",
});
Copy
type: edgecenter:InstanceV2
properties:
    allowAppPorts: false
    bootVolumes:
        - attachmentTag: string
          bootIndex: 0
          name: string
          size: 0
          typeName: string
          volumeId: string
    configurations:
        - key: string
          value: string
    dataVolumes:
        - attachmentTag: string
          name: string
          size: 0
          typeName: string
          volumeId: string
    flavorId: string
    instanceV2Id: string
    interfaces:
        - ipAddress: string
          isDefault: false
          networkId: string
          networkName: string
          portId: string
          reservedFixedIpPortId: string
          subnetId: string
          type: string
    keypairName: string
    metadata:
        string: string
    name: string
    nameTemplate: string
    password: string
    projectId: 0
    projectName: string
    regionId: 0
    regionName: string
    serverGroup: string
    status: string
    userData: string
    username: string
    vmState: string
Copy

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

BootVolumes This property is required. List<InstanceV2BootVolume>
A set defining the volumes to be attached to the instance.
FlavorId This property is required. string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
Interfaces This property is required. List<InstanceV2Interface>
A list defining the network interfaces to be attached to the instance.
AllowAppPorts bool
A boolean indicating whether to allow application ports on the instance.
Configurations List<InstanceV2Configuration>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
DataVolumes List<InstanceV2DataVolume>
A set defining the volumes to be attached to the instance.
InstanceV2Id string
The ID of this resource.
KeypairName string
The name of the key pair to be associated with the instance for SSH access.
Metadata Dictionary<string, string>
A map containing metadata, for example tags.
Name string
The name of the instance.
NameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
Password string
The password to be used for accessing the instance. Required with username.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServerGroup string
The ID (uuid) of the server group to which the instance should belong.
Status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
UserData string
A field for specifying user data to be used for configuring the instance at launch time.
Username string
The username to be used for accessing the instance. Required with password.
VmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
BootVolumes This property is required. []InstanceV2BootVolumeArgs
A set defining the volumes to be attached to the instance.
FlavorId This property is required. string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
Interfaces This property is required. []InstanceV2InterfaceArgs
A list defining the network interfaces to be attached to the instance.
AllowAppPorts bool
A boolean indicating whether to allow application ports on the instance.
Configurations []InstanceV2ConfigurationArgs
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
DataVolumes []InstanceV2DataVolumeArgs
A set defining the volumes to be attached to the instance.
InstanceV2Id string
The ID of this resource.
KeypairName string
The name of the key pair to be associated with the instance for SSH access.
Metadata map[string]string
A map containing metadata, for example tags.
Name string
The name of the instance.
NameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
Password string
The password to be used for accessing the instance. Required with username.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServerGroup string
The ID (uuid) of the server group to which the instance should belong.
Status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
UserData string
A field for specifying user data to be used for configuring the instance at launch time.
Username string
The username to be used for accessing the instance. Required with password.
VmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
bootVolumes This property is required. List<InstanceV2BootVolume>
A set defining the volumes to be attached to the instance.
flavorId This property is required. String
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
interfaces This property is required. List<InstanceV2Interface>
A list defining the network interfaces to be attached to the instance.
allowAppPorts Boolean
A boolean indicating whether to allow application ports on the instance.
configurations List<InstanceV2Configuration>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes List<InstanceV2DataVolume>
A set defining the volumes to be attached to the instance.
instanceV2Id String
The ID of this resource.
keypairName String
The name of the key pair to be associated with the instance for SSH access.
metadata Map<String,String>
A map containing metadata, for example tags.
name String
The name of the instance.
nameTemplate String
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password String
The password to be used for accessing the instance. Required with username.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup String
The ID (uuid) of the server group to which the instance should belong.
status String
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData String
A field for specifying user data to be used for configuring the instance at launch time.
username String
The username to be used for accessing the instance. Required with password.
vmState String
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
bootVolumes This property is required. InstanceV2BootVolume[]
A set defining the volumes to be attached to the instance.
flavorId This property is required. string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
interfaces This property is required. InstanceV2Interface[]
A list defining the network interfaces to be attached to the instance.
allowAppPorts boolean
A boolean indicating whether to allow application ports on the instance.
configurations InstanceV2Configuration[]
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes InstanceV2DataVolume[]
A set defining the volumes to be attached to the instance.
instanceV2Id string
The ID of this resource.
keypairName string
The name of the key pair to be associated with the instance for SSH access.
metadata {[key: string]: string}
A map containing metadata, for example tags.
name string
The name of the instance.
nameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password string
The password to be used for accessing the instance. Required with username.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup string
The ID (uuid) of the server group to which the instance should belong.
status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData string
A field for specifying user data to be used for configuring the instance at launch time.
username string
The username to be used for accessing the instance. Required with password.
vmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
boot_volumes This property is required. Sequence[InstanceV2BootVolumeArgs]
A set defining the volumes to be attached to the instance.
flavor_id This property is required. str
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
interfaces This property is required. Sequence[InstanceV2InterfaceArgs]
A list defining the network interfaces to be attached to the instance.
allow_app_ports bool
A boolean indicating whether to allow application ports on the instance.
configurations Sequence[InstanceV2ConfigurationArgs]
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
data_volumes Sequence[InstanceV2DataVolumeArgs]
A set defining the volumes to be attached to the instance.
instance_v2_id str
The ID of this resource.
keypair_name str
The name of the key pair to be associated with the instance for SSH access.
metadata Mapping[str, str]
A map containing metadata, for example tags.
name str
The name of the instance.
name_template str
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password str
The password to be used for accessing the instance. Required with username.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
server_group str
The ID (uuid) of the server group to which the instance should belong.
status str
The current status of the instance. This is computed automatically and can be used to track the instance's state.
user_data str
A field for specifying user data to be used for configuring the instance at launch time.
username str
The username to be used for accessing the instance. Required with password.
vm_state str
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
bootVolumes This property is required. List<Property Map>
A set defining the volumes to be attached to the instance.
flavorId This property is required. String
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
interfaces This property is required. List<Property Map>
A list defining the network interfaces to be attached to the instance.
allowAppPorts Boolean
A boolean indicating whether to allow application ports on the instance.
configurations List<Property Map>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes List<Property Map>
A set defining the volumes to be attached to the instance.
instanceV2Id String
The ID of this resource.
keypairName String
The name of the key pair to be associated with the instance for SSH access.
metadata Map<String>
A map containing metadata, for example tags.
name String
The name of the instance.
nameTemplate String
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password String
The password to be used for accessing the instance. Required with username.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup String
The ID (uuid) of the server group to which the instance should belong.
status String
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData String
A field for specifying user data to be used for configuring the instance at launch time.
username String
The username to be used for accessing the instance. Required with password.
vmState String
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.

Outputs

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

Flavor Dictionary<string, string>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
Id string
The provider-assigned unique ID for this managed resource.
Flavor map[string]string
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
Id string
The provider-assigned unique ID for this managed resource.
flavor Map<String,String>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
id String
The provider-assigned unique ID for this managed resource.
flavor {[key: string]: string}
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
id string
The provider-assigned unique ID for this managed resource.
flavor Mapping[str, str]
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
id str
The provider-assigned unique ID for this managed resource.
flavor Map<String>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing InstanceV2 Resource

Get an existing InstanceV2 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?: InstanceV2State, opts?: CustomResourceOptions): InstanceV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_app_ports: Optional[bool] = None,
        boot_volumes: Optional[Sequence[InstanceV2BootVolumeArgs]] = None,
        configurations: Optional[Sequence[InstanceV2ConfigurationArgs]] = None,
        data_volumes: Optional[Sequence[InstanceV2DataVolumeArgs]] = None,
        flavor: Optional[Mapping[str, str]] = None,
        flavor_id: Optional[str] = None,
        instance_v2_id: Optional[str] = None,
        interfaces: Optional[Sequence[InstanceV2InterfaceArgs]] = None,
        keypair_name: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        name_template: Optional[str] = None,
        password: Optional[str] = None,
        project_id: Optional[float] = None,
        project_name: Optional[str] = None,
        region_id: Optional[float] = None,
        region_name: Optional[str] = None,
        server_group: Optional[str] = None,
        status: Optional[str] = None,
        user_data: Optional[str] = None,
        username: Optional[str] = None,
        vm_state: Optional[str] = None) -> InstanceV2
func GetInstanceV2(ctx *Context, name string, id IDInput, state *InstanceV2State, opts ...ResourceOption) (*InstanceV2, error)
public static InstanceV2 Get(string name, Input<string> id, InstanceV2State? state, CustomResourceOptions? opts = null)
public static InstanceV2 get(String name, Output<String> id, InstanceV2State state, CustomResourceOptions options)
resources:  _:    type: edgecenter:InstanceV2    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:
AllowAppPorts bool
A boolean indicating whether to allow application ports on the instance.
BootVolumes List<InstanceV2BootVolume>
A set defining the volumes to be attached to the instance.
Configurations List<InstanceV2Configuration>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
DataVolumes List<InstanceV2DataVolume>
A set defining the volumes to be attached to the instance.
Flavor Dictionary<string, string>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
FlavorId string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
InstanceV2Id string
The ID of this resource.
Interfaces List<InstanceV2Interface>
A list defining the network interfaces to be attached to the instance.
KeypairName string
The name of the key pair to be associated with the instance for SSH access.
Metadata Dictionary<string, string>
A map containing metadata, for example tags.
Name string
The name of the instance.
NameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
Password string
The password to be used for accessing the instance. Required with username.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServerGroup string
The ID (uuid) of the server group to which the instance should belong.
Status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
UserData string
A field for specifying user data to be used for configuring the instance at launch time.
Username string
The username to be used for accessing the instance. Required with password.
VmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
AllowAppPorts bool
A boolean indicating whether to allow application ports on the instance.
BootVolumes []InstanceV2BootVolumeArgs
A set defining the volumes to be attached to the instance.
Configurations []InstanceV2ConfigurationArgs
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
DataVolumes []InstanceV2DataVolumeArgs
A set defining the volumes to be attached to the instance.
Flavor map[string]string
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
FlavorId string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
InstanceV2Id string
The ID of this resource.
Interfaces []InstanceV2InterfaceArgs
A list defining the network interfaces to be attached to the instance.
KeypairName string
The name of the key pair to be associated with the instance for SSH access.
Metadata map[string]string
A map containing metadata, for example tags.
Name string
The name of the instance.
NameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
Password string
The password to be used for accessing the instance. Required with username.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServerGroup string
The ID (uuid) of the server group to which the instance should belong.
Status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
UserData string
A field for specifying user data to be used for configuring the instance at launch time.
Username string
The username to be used for accessing the instance. Required with password.
VmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
allowAppPorts Boolean
A boolean indicating whether to allow application ports on the instance.
bootVolumes List<InstanceV2BootVolume>
A set defining the volumes to be attached to the instance.
configurations List<InstanceV2Configuration>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes List<InstanceV2DataVolume>
A set defining the volumes to be attached to the instance.
flavor Map<String,String>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
flavorId String
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
instanceV2Id String
The ID of this resource.
interfaces List<InstanceV2Interface>
A list defining the network interfaces to be attached to the instance.
keypairName String
The name of the key pair to be associated with the instance for SSH access.
metadata Map<String,String>
A map containing metadata, for example tags.
name String
The name of the instance.
nameTemplate String
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password String
The password to be used for accessing the instance. Required with username.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup String
The ID (uuid) of the server group to which the instance should belong.
status String
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData String
A field for specifying user data to be used for configuring the instance at launch time.
username String
The username to be used for accessing the instance. Required with password.
vmState String
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
allowAppPorts boolean
A boolean indicating whether to allow application ports on the instance.
bootVolumes InstanceV2BootVolume[]
A set defining the volumes to be attached to the instance.
configurations InstanceV2Configuration[]
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes InstanceV2DataVolume[]
A set defining the volumes to be attached to the instance.
flavor {[key: string]: string}
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
flavorId string
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
instanceV2Id string
The ID of this resource.
interfaces InstanceV2Interface[]
A list defining the network interfaces to be attached to the instance.
keypairName string
The name of the key pair to be associated with the instance for SSH access.
metadata {[key: string]: string}
A map containing metadata, for example tags.
name string
The name of the instance.
nameTemplate string
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password string
The password to be used for accessing the instance. Required with username.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup string
The ID (uuid) of the server group to which the instance should belong.
status string
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData string
A field for specifying user data to be used for configuring the instance at launch time.
username string
The username to be used for accessing the instance. Required with password.
vmState string
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
allow_app_ports bool
A boolean indicating whether to allow application ports on the instance.
boot_volumes Sequence[InstanceV2BootVolumeArgs]
A set defining the volumes to be attached to the instance.
configurations Sequence[InstanceV2ConfigurationArgs]
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
data_volumes Sequence[InstanceV2DataVolumeArgs]
A set defining the volumes to be attached to the instance.
flavor Mapping[str, str]
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
flavor_id str
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
instance_v2_id str
The ID of this resource.
interfaces Sequence[InstanceV2InterfaceArgs]
A list defining the network interfaces to be attached to the instance.
keypair_name str
The name of the key pair to be associated with the instance for SSH access.
metadata Mapping[str, str]
A map containing metadata, for example tags.
name str
The name of the instance.
name_template str
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password str
The password to be used for accessing the instance. Required with username.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
server_group str
The ID (uuid) of the server group to which the instance should belong.
status str
The current status of the instance. This is computed automatically and can be used to track the instance's state.
user_data str
A field for specifying user data to be used for configuring the instance at launch time.
username str
The username to be used for accessing the instance. Required with password.
vm_state str
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.
allowAppPorts Boolean
A boolean indicating whether to allow application ports on the instance.
bootVolumes List<Property Map>
A set defining the volumes to be attached to the instance.
configurations List<Property Map>
A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
dataVolumes List<Property Map>
A set defining the volumes to be attached to the instance.
flavor Map<String>
A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
flavorId String
The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
instanceV2Id String
The ID of this resource.
interfaces List<Property Map>
A list defining the network interfaces to be attached to the instance.
keypairName String
The name of the key pair to be associated with the instance for SSH access.
metadata Map<String>
A map containing metadata, for example tags.
name String
The name of the instance.
nameTemplate String
A template used to generate the instance name. This field cannot be used with 'name_templates'.
password String
The password to be used for accessing the instance. Required with username.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
serverGroup String
The ID (uuid) of the server group to which the instance should belong.
status String
The current status of the instance. This is computed automatically and can be used to track the instance's state.
userData String
A field for specifying user data to be used for configuring the instance at launch time.
username String
The username to be used for accessing the instance. Required with password.
vmState String
The current virtual machine state of the instance, allowing you to start or stop the VM. Possible values are stopped and active.

Supporting Types

InstanceV2BootVolume
, InstanceV2BootVolumeArgs

BootIndex This property is required. double
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
VolumeId This property is required. string
The ID of the volume.
AttachmentTag string
The block device attachment tag (exposed in the metadata).
Name string
The name assigned to the volume. Defaults to 'system'.
Size double
The size of the volume, specified in gigabytes (GB).
TypeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
BootIndex This property is required. float64
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
VolumeId This property is required. string
The ID of the volume.
AttachmentTag string
The block device attachment tag (exposed in the metadata).
Name string
The name assigned to the volume. Defaults to 'system'.
Size float64
The size of the volume, specified in gigabytes (GB).
TypeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
bootIndex This property is required. Double
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
volumeId This property is required. String
The ID of the volume.
attachmentTag String
The block device attachment tag (exposed in the metadata).
name String
The name assigned to the volume. Defaults to 'system'.
size Double
The size of the volume, specified in gigabytes (GB).
typeName String
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
bootIndex This property is required. number
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
volumeId This property is required. string
The ID of the volume.
attachmentTag string
The block device attachment tag (exposed in the metadata).
name string
The name assigned to the volume. Defaults to 'system'.
size number
The size of the volume, specified in gigabytes (GB).
typeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
boot_index This property is required. float
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
volume_id This property is required. str
The ID of the volume.
attachment_tag str
The block device attachment tag (exposed in the metadata).
name str
The name assigned to the volume. Defaults to 'system'.
size float
The size of the volume, specified in gigabytes (GB).
type_name str
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
bootIndex This property is required. Number
If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
volumeId This property is required. String
The ID of the volume.
attachmentTag String
The block device attachment tag (exposed in the metadata).
name String
The name assigned to the volume. Defaults to 'system'.
size Number
The size of the volume, specified in gigabytes (GB).
typeName String
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.

InstanceV2Configuration
, InstanceV2ConfigurationArgs

Key This property is required. string
Value This property is required. string
Key This property is required. string
Value This property is required. string
key This property is required. String
value This property is required. String
key This property is required. string
value This property is required. string
key This property is required. str
value This property is required. str
key This property is required. String
value This property is required. String

InstanceV2DataVolume
, InstanceV2DataVolumeArgs

VolumeId This property is required. string
The ID of the volume.
AttachmentTag string
The block device attachment tag (exposed in the metadata).
Name string
The name assigned to the volume. Defaults to 'system'.
Size double
The size of the volume, specified in gigabytes (GB).
TypeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
VolumeId This property is required. string
The ID of the volume.
AttachmentTag string
The block device attachment tag (exposed in the metadata).
Name string
The name assigned to the volume. Defaults to 'system'.
Size float64
The size of the volume, specified in gigabytes (GB).
TypeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
volumeId This property is required. String
The ID of the volume.
attachmentTag String
The block device attachment tag (exposed in the metadata).
name String
The name assigned to the volume. Defaults to 'system'.
size Double
The size of the volume, specified in gigabytes (GB).
typeName String
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
volumeId This property is required. string
The ID of the volume.
attachmentTag string
The block device attachment tag (exposed in the metadata).
name string
The name assigned to the volume. Defaults to 'system'.
size number
The size of the volume, specified in gigabytes (GB).
typeName string
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
volume_id This property is required. str
The ID of the volume.
attachment_tag str
The block device attachment tag (exposed in the metadata).
name str
The name assigned to the volume. Defaults to 'system'.
size float
The size of the volume, specified in gigabytes (GB).
type_name str
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
volumeId This property is required. String
The ID of the volume.
attachmentTag String
The block device attachment tag (exposed in the metadata).
name String
The name assigned to the volume. Defaults to 'system'.
size Number
The size of the volume, specified in gigabytes (GB).
typeName String
The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.

InstanceV2Interface
, InstanceV2InterfaceArgs

Type This property is required. string
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
IpAddress string
IP address of the interface.
IsDefault bool
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
NetworkId string
Required if type is 'subnet'.
NetworkName string
Name of the network.
PortId string
ReservedFixedIpPortId string
required if type is 'reservedfixedip'
SubnetId string
Required if type is 'subnet'.
Type This property is required. string
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
IpAddress string
IP address of the interface.
IsDefault bool
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
NetworkId string
Required if type is 'subnet'.
NetworkName string
Name of the network.
PortId string
ReservedFixedIpPortId string
required if type is 'reservedfixedip'
SubnetId string
Required if type is 'subnet'.
type This property is required. String
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
ipAddress String
IP address of the interface.
isDefault Boolean
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
networkId String
Required if type is 'subnet'.
networkName String
Name of the network.
portId String
reservedFixedIpPortId String
required if type is 'reservedfixedip'
subnetId String
Required if type is 'subnet'.
type This property is required. string
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
ipAddress string
IP address of the interface.
isDefault boolean
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
networkId string
Required if type is 'subnet'.
networkName string
Name of the network.
portId string
reservedFixedIpPortId string
required if type is 'reservedfixedip'
subnetId string
Required if type is 'subnet'.
type This property is required. str
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
ip_address str
IP address of the interface.
is_default bool
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
network_id str
Required if type is 'subnet'.
network_name str
Name of the network.
port_id str
reserved_fixed_ip_port_id str
required if type is 'reservedfixedip'
subnet_id str
Required if type is 'subnet'.
type This property is required. String
Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
ipAddress String
IP address of the interface.
isDefault Boolean
This field determines whether this interface will be connected first. The first connected interface defines the default routing. WARNING: if you change this attribute, interfaces connected earlier than the selected new default interface will be reattached and it's IP addresses can be changed, if the reserved IP address is not used in these interfaces. You must always have exactly one interface with set attribute 'is_default.'
networkId String
Required if type is 'subnet'.
networkName String
Name of the network.
portId String
reservedFixedIpPortId String
required if type is 'reservedfixedip'
subnetId String
Required if type is 'subnet'.

Import

import using <project_id>:<region_id>:<instance_id> format

$ pulumi import edgecenter:index/instanceV2:InstanceV2 instance1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
Copy

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

Package Details

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