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],
},
});
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],
})
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
})
}
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,
},
},
});
});
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());
}
}
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 string
- The unique name of the resource.
- args InstanceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args InstanceV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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:
- Boot
Volumes List<InstanceV2Boot Volume> - A set defining the volumes to be attached to the instance.
- Flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- Interfaces
List<Instance
V2Interface> - A list defining the network interfaces to be attached to the instance.
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
List<Instance
V2Configuration> - 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 List<InstanceV2Data Volume> - A set defining the volumes to be attached to the instance.
- Instance
V2Id string - The ID of this resource.
- Keypair
Name 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.
- Name
Template 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.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Server
Group 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.
- User
Data 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.
- Vm
State 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 []InstanceV2Boot Volume Args - A set defining the volumes to be attached to the instance.
- Flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- Interfaces
[]Instance
V2Interface Args - A list defining the network interfaces to be attached to the instance.
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
[]Instance
V2Configuration Args - 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 []InstanceV2Data Volume Args - A set defining the volumes to be attached to the instance.
- Instance
V2Id string - The ID of this resource.
- Keypair
Name 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.
- Name
Template 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.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Server
Group 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.
- User
Data 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.
- Vm
State 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 List<InstanceV2Boot Volume> - A set defining the volumes to be attached to the instance.
- flavor
Id String - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- interfaces
List<Instance
V2Interface> - A list defining the network interfaces to be attached to the instance.
- allow
App BooleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
List<Instance
V2Configuration> - 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 List<InstanceV2Data Volume> - A set defining the volumes to be attached to the instance.
- instance
V2Id String - The ID of this resource.
- keypair
Name 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.
- name
Template 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.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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 InstanceV2Boot Volume[] - A set defining the volumes to be attached to the instance.
- flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- interfaces
Instance
V2Interface[] - A list defining the network interfaces to be attached to the instance.
- allow
App booleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
Instance
V2Configuration[] - 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 InstanceV2Data Volume[] - A set defining the volumes to be attached to the instance.
- instance
V2Id string - The ID of this resource.
- keypair
Name 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.
- name
Template 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.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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 Sequence[InstanceV2Boot Volume Args] - A set defining the volumes to be attached to the instance.
- 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'.
- interfaces
Sequence[Instance
V2Interface Args] - A list defining the network interfaces to be attached to the instance.
- allow_
app_ boolports - A boolean indicating whether to allow application ports on the instance.
- configurations
Sequence[Instance
V2Configuration Args] - 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[InstanceV2Data Volume Args] - A set defining the volumes to be attached to the instance.
- instance_
v2_ strid - 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.
- boot
Volumes List<Property Map> - A set defining the volumes to be attached to the instance.
- flavor
Id String - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- interfaces List<Property Map>
- A list defining the network interfaces to be attached to the instance.
- allow
App BooleanPorts - 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/..."}
- data
Volumes List<Property Map> - A set defining the volumes to be attached to the instance.
- instance
V2Id String - The ID of this resource.
- keypair
Name 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.
- name
Template 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.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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:
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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Boot
Volumes List<InstanceV2Boot Volume> - A set defining the volumes to be attached to the instance.
- Configurations
List<Instance
V2Configuration> - 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 List<InstanceV2Data Volume> - 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, ...}.
- Flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- Instance
V2Id string - The ID of this resource.
- Interfaces
List<Instance
V2Interface> - A list defining the network interfaces to be attached to the instance.
- Keypair
Name 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.
- Name
Template 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.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Server
Group 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.
- User
Data 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.
- Vm
State 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 boolPorts - A boolean indicating whether to allow application ports on the instance.
- Boot
Volumes []InstanceV2Boot Volume Args - A set defining the volumes to be attached to the instance.
- Configurations
[]Instance
V2Configuration Args - 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 []InstanceV2Data Volume Args - 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, ...}.
- Flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- Instance
V2Id string - The ID of this resource.
- Interfaces
[]Instance
V2Interface Args - A list defining the network interfaces to be attached to the instance.
- Keypair
Name 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.
- Name
Template 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.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Server
Group 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.
- User
Data 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.
- Vm
State 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 BooleanPorts - A boolean indicating whether to allow application ports on the instance.
- boot
Volumes List<InstanceV2Boot Volume> - A set defining the volumes to be attached to the instance.
- configurations
List<Instance
V2Configuration> - 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 List<InstanceV2Data Volume> - 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, ...}.
- flavor
Id String - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- instance
V2Id String - The ID of this resource.
- interfaces
List<Instance
V2Interface> - A list defining the network interfaces to be attached to the instance.
- keypair
Name 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.
- name
Template 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.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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 booleanPorts - A boolean indicating whether to allow application ports on the instance.
- boot
Volumes InstanceV2Boot Volume[] - A set defining the volumes to be attached to the instance.
- configurations
Instance
V2Configuration[] - 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 InstanceV2Data Volume[] - 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, ...}.
- flavor
Id string - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- instance
V2Id string - The ID of this resource.
- interfaces
Instance
V2Interface[] - A list defining the network interfaces to be attached to the instance.
- keypair
Name 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.
- name
Template 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.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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_ boolports - A boolean indicating whether to allow application ports on the instance.
- boot_
volumes Sequence[InstanceV2Boot Volume Args] - A set defining the volumes to be attached to the instance.
- configurations
Sequence[Instance
V2Configuration Args] - 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[InstanceV2Data Volume Args] - 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_ strid - The ID of this resource.
- interfaces
Sequence[Instance
V2Interface Args] - 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.
- allow
App BooleanPorts - A boolean indicating whether to allow application ports on the instance.
- boot
Volumes 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/..."}
- data
Volumes 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, ...}.
- flavor
Id String - The ID of the flavor to be used for the instance, determining its compute and memory, for example 'g1-standard-2-4'.
- instance
V2Id String - The ID of this resource.
- interfaces List<Property Map>
- A list defining the network interfaces to be attached to the instance.
- keypair
Name 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.
- name
Template 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.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- server
Group 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.
- user
Data 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.
- vm
State 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
- Boot
Index double - If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
- Volume
Id string - The ID of the volume.
- Attachment
Tag 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).
- Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- Boot
Index float64 - If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
- Volume
Id string - The ID of the volume.
- Attachment
Tag 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).
- Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- boot
Index Double - If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
- volume
Id String - The ID of the volume.
- attachment
Tag 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).
- type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- boot
Index number - If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
- volume
Id string - The ID of the volume.
- attachment
Tag 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).
- type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- boot_
index 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 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'.
- boot
Index Number - If boot_index==0 volumes can not detached. It is used only when creating an instance. This attribute can't be updated
- volume
Id String - The ID of the volume.
- attachment
Tag 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).
- type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
InstanceV2Configuration, InstanceV2ConfigurationArgs
InstanceV2DataVolume, InstanceV2DataVolumeArgs
- Volume
Id string - The ID of the volume.
- Attachment
Tag 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).
- Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- Volume
Id string - The ID of the volume.
- Attachment
Tag 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).
- Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- volume
Id String - The ID of the volume.
- attachment
Tag 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).
- type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- volume
Id string - The ID of the volume.
- attachment
Tag 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).
- type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
- volume_
id 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'.
- volume
Id String - The ID of the volume.
- attachment
Tag 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).
- type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
InstanceV2Interface, InstanceV2InterfaceArgs
- Type string
- Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
- Ip
Address string - 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 string - Required if type is 'subnet'.
- Network
Name string - Name of the network.
- Port
Id string - Reserved
Fixed stringIp Port Id - required if type is 'reservedfixedip'
- Subnet
Id string - Required if type is 'subnet'.
- Type string
- Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
- Ip
Address string - 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 string - Required if type is 'subnet'.
- Network
Name string - Name of the network.
- Port
Id string - Reserved
Fixed stringIp Port Id - required if type is 'reservedfixedip'
- Subnet
Id string - Required if type is 'subnet'.
- type String
- Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
- ip
Address String - IP address of the interface.
- is
Default 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.'
- network
Id String - Required if type is 'subnet'.
- network
Name String - Name of the network.
- port
Id String - reserved
Fixed StringIp Port Id - required if type is 'reservedfixedip'
- subnet
Id String - Required if type is 'subnet'.
- type string
- Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
- ip
Address string - IP address of the interface.
- is
Default 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.'
- network
Id string - Required if type is 'subnet'.
- network
Name string - Name of the network.
- port
Id string - reserved
Fixed stringIp Port Id - required if type is 'reservedfixedip'
- subnet
Id string - Required if type is 'subnet'.
- type 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_ strip_ port_ id - required if type is 'reservedfixedip'
- subnet_
id str - Required if type is 'subnet'.
- type String
- Available values are 'subnet', 'external', 'reservedfixedip'. You can't create more than one interface on the same subnet
- ip
Address String - IP address of the interface.
- is
Default 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.'
- network
Id String - Required if type is 'subnet'.
- network
Name String - Name of the network.
- port
Id String - reserved
Fixed StringIp Port Id - required if type is 'reservedfixedip'
- subnet
Id 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
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.