edgecenter.Instance
Explore with Pulumi AI
WARNING: Resource “instance” is deprecated and unavailable. Use edgecenter_instanceV2 resource instead.
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 network = new edgecenter.Network("network", {
type: "vxlan",
regionId: 1,
projectId: 1,
});
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: 1,
projectId: 1,
});
const firstVolumeVolume = new edgecenter.Volume("firstVolumeVolume", {
typeName: "ssd_hiiops",
size: 5,
imageId: "f4ce3d30-e29c-4cfd-811f-46f383b6081f",
regionId: 1,
projectId: 1,
});
const secondVolume = new edgecenter.Volume("secondVolume", {
typeName: "ssd_hiiops",
size: 5,
regionId: 1,
projectId: 1,
});
const instance = new edgecenter.Instance("instance", {
flavorId: "g1-standard-2-4",
volumes: [
{
source: "existing-volume",
volumeId: firstVolumeVolume.volumeId,
bootIndex: 0,
},
{
source: "existing-volume",
volumeId: secondVolume.volumeId,
bootIndex: 1,
},
],
interfaces: [{
type: "subnet",
networkId: network.networkId,
subnetId: subnet.subnetId,
securityGroups: ["d75db0b2-58f1-4a11-88c6-a932bb897310"],
portSecurityDisabled: true,
}],
metadataMap: {
some_key: "some_value",
stage: "dev",
},
configurations: [{
key: "some_key",
value: "some_data",
}],
regionId: 1,
projectId: 1,
});
//***
// another one example with one interface to private network and fip to internet
//***
const fixedIp = new edgecenter.Reservedfixedip("fixedIp", {
projectId: 1,
regionId: 1,
type: "ip_address",
networkId: "faf6507b-1ff1-4ebf-b540-befd5c09fe06",
fixedIpAddress: "192.168.13.6",
isVip: false,
});
const firstVolumeIndex_volumeVolume = new edgecenter.Volume("firstVolumeIndex/volumeVolume", {
typeName: "ssd_hiiops",
size: 10,
imageId: "6dc4e061-6fab-41f3-91a3-0ba848fb32d9",
projectId: 1,
regionId: 1,
});
const fip = new edgecenter.Floatingip("fip", {
projectId: 1,
regionId: 1,
fixedIpAddress: fixedIp.fixedIpAddress,
portId: fixedIp.portId,
});
const index_instanceInstance = new edgecenter.Instance("index/instanceInstance", {
projectId: 1,
regionId: 1,
flavorId: "g1-standard-1-2",
volumes: [{
source: "existing-volume",
volumeId: firstVolumeVolume.volumeId,
bootIndex: 0,
}],
interfaces: [{
type: "reserved_fixed_ip",
portId: fixedIp.portId,
fipSource: "existing",
existingFipId: fip.floatingipId,
securityGroups: ["ada84751-fcca-4491-9249-2dfceb321616"],
}],
});
import pulumi
import pulumi_edgecenter as edgecenter
network = edgecenter.Network("network",
type="vxlan",
region_id=1,
project_id=1)
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=1,
project_id=1)
first_volume_volume = edgecenter.Volume("firstVolumeVolume",
type_name="ssd_hiiops",
size=5,
image_id="f4ce3d30-e29c-4cfd-811f-46f383b6081f",
region_id=1,
project_id=1)
second_volume = edgecenter.Volume("secondVolume",
type_name="ssd_hiiops",
size=5,
region_id=1,
project_id=1)
instance = edgecenter.Instance("instance",
flavor_id="g1-standard-2-4",
volumes=[
{
"source": "existing-volume",
"volume_id": first_volume_volume.volume_id,
"boot_index": 0,
},
{
"source": "existing-volume",
"volume_id": second_volume.volume_id,
"boot_index": 1,
},
],
interfaces=[{
"type": "subnet",
"network_id": network.network_id,
"subnet_id": subnet.subnet_id,
"security_groups": ["d75db0b2-58f1-4a11-88c6-a932bb897310"],
"port_security_disabled": True,
}],
metadata_map={
"some_key": "some_value",
"stage": "dev",
},
configurations=[{
"key": "some_key",
"value": "some_data",
}],
region_id=1,
project_id=1)
#***
# another one example with one interface to private network and fip to internet
#***
fixed_ip = edgecenter.Reservedfixedip("fixedIp",
project_id=1,
region_id=1,
type="ip_address",
network_id="faf6507b-1ff1-4ebf-b540-befd5c09fe06",
fixed_ip_address="192.168.13.6",
is_vip=False)
first_volume_index_volume_volume = edgecenter.Volume("firstVolumeIndex/volumeVolume",
type_name="ssd_hiiops",
size=10,
image_id="6dc4e061-6fab-41f3-91a3-0ba848fb32d9",
project_id=1,
region_id=1)
fip = edgecenter.Floatingip("fip",
project_id=1,
region_id=1,
fixed_ip_address=fixed_ip.fixed_ip_address,
port_id=fixed_ip.port_id)
index_instance_instance = edgecenter.Instance("index/instanceInstance",
project_id=1,
region_id=1,
flavor_id="g1-standard-1-2",
volumes=[{
"source": "existing-volume",
"volume_id": first_volume_volume.volume_id,
"boot_index": 0,
}],
interfaces=[{
"type": "reserved_fixed_ip",
"port_id": fixed_ip.port_id,
"fip_source": "existing",
"existing_fip_id": fip.floatingip_id,
"security_groups": ["ada84751-fcca-4491-9249-2dfceb321616"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network, err := edgecenter.NewNetwork(ctx, "network", &edgecenter.NetworkArgs{
Type: pulumi.String("vxlan"),
RegionId: pulumi.Float64(1),
ProjectId: pulumi.Float64(1),
})
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(1),
ProjectId: pulumi.Float64(1),
})
if err != nil {
return err
}
firstVolumeVolume, err := edgecenter.NewVolume(ctx, "firstVolumeVolume", &edgecenter.VolumeArgs{
TypeName: pulumi.String("ssd_hiiops"),
Size: pulumi.Float64(5),
ImageId: pulumi.String("f4ce3d30-e29c-4cfd-811f-46f383b6081f"),
RegionId: pulumi.Float64(1),
ProjectId: pulumi.Float64(1),
})
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(1),
ProjectId: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = edgecenter.NewInstance(ctx, "instance", &edgecenter.InstanceArgs{
FlavorId: pulumi.String("g1-standard-2-4"),
Volumes: edgecenter.InstanceVolumeArray{
&edgecenter.InstanceVolumeArgs{
Source: pulumi.String("existing-volume"),
VolumeId: firstVolumeVolume.VolumeId,
BootIndex: pulumi.Float64(0),
},
&edgecenter.InstanceVolumeArgs{
Source: pulumi.String("existing-volume"),
VolumeId: secondVolume.VolumeId,
BootIndex: pulumi.Float64(1),
},
},
Interfaces: edgecenter.InstanceInterfaceArray{
&edgecenter.InstanceInterfaceArgs{
Type: pulumi.String("subnet"),
NetworkId: network.NetworkId,
SubnetId: subnet.SubnetId,
SecurityGroups: pulumi.StringArray{
pulumi.String("d75db0b2-58f1-4a11-88c6-a932bb897310"),
},
PortSecurityDisabled: pulumi.Bool(true),
},
},
MetadataMap: pulumi.StringMap{
"some_key": pulumi.String("some_value"),
"stage": pulumi.String("dev"),
},
Configurations: edgecenter.InstanceConfigurationArray{
&edgecenter.InstanceConfigurationArgs{
Key: pulumi.String("some_key"),
Value: pulumi.String("some_data"),
},
},
RegionId: pulumi.Float64(1),
ProjectId: pulumi.Float64(1),
})
if err != nil {
return err
}
fixedIp, err := edgecenter.NewReservedfixedip(ctx, "fixedIp", &edgecenter.ReservedfixedipArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Type: pulumi.String("ip_address"),
NetworkId: pulumi.String("faf6507b-1ff1-4ebf-b540-befd5c09fe06"),
FixedIpAddress: pulumi.String("192.168.13.6"),
IsVip: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = edgecenter.NewVolume(ctx, "firstVolumeIndex/volumeVolume", &edgecenter.VolumeArgs{
TypeName: pulumi.String("ssd_hiiops"),
Size: pulumi.Float64(10),
ImageId: pulumi.String("6dc4e061-6fab-41f3-91a3-0ba848fb32d9"),
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
})
if err != nil {
return err
}
fip, err := edgecenter.NewFloatingip(ctx, "fip", &edgecenter.FloatingipArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
FixedIpAddress: fixedIp.FixedIpAddress,
PortId: fixedIp.PortId,
})
if err != nil {
return err
}
_, err = edgecenter.NewInstance(ctx, "index/instanceInstance", &edgecenter.InstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
FlavorId: pulumi.String("g1-standard-1-2"),
Volumes: edgecenter.InstanceVolumeArray{
&edgecenter.InstanceVolumeArgs{
Source: pulumi.String("existing-volume"),
VolumeId: firstVolumeVolume.VolumeId,
BootIndex: pulumi.Float64(0),
},
},
Interfaces: edgecenter.InstanceInterfaceArray{
&edgecenter.InstanceInterfaceArgs{
Type: pulumi.String("reserved_fixed_ip"),
PortId: fixedIp.PortId,
FipSource: pulumi.String("existing"),
ExistingFipId: fip.FloatingipId,
SecurityGroups: pulumi.StringArray{
pulumi.String("ada84751-fcca-4491-9249-2dfceb321616"),
},
},
},
})
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 network = new Edgecenter.Network("network", new()
{
Type = "vxlan",
RegionId = 1,
ProjectId = 1,
});
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 = 1,
ProjectId = 1,
});
var firstVolumeVolume = new Edgecenter.Volume("firstVolumeVolume", new()
{
TypeName = "ssd_hiiops",
Size = 5,
ImageId = "f4ce3d30-e29c-4cfd-811f-46f383b6081f",
RegionId = 1,
ProjectId = 1,
});
var secondVolume = new Edgecenter.Volume("secondVolume", new()
{
TypeName = "ssd_hiiops",
Size = 5,
RegionId = 1,
ProjectId = 1,
});
var instance = new Edgecenter.Instance("instance", new()
{
FlavorId = "g1-standard-2-4",
Volumes = new[]
{
new Edgecenter.Inputs.InstanceVolumeArgs
{
Source = "existing-volume",
VolumeId = firstVolumeVolume.VolumeId,
BootIndex = 0,
},
new Edgecenter.Inputs.InstanceVolumeArgs
{
Source = "existing-volume",
VolumeId = secondVolume.VolumeId,
BootIndex = 1,
},
},
Interfaces = new[]
{
new Edgecenter.Inputs.InstanceInterfaceArgs
{
Type = "subnet",
NetworkId = network.NetworkId,
SubnetId = subnet.SubnetId,
SecurityGroups = new[]
{
"d75db0b2-58f1-4a11-88c6-a932bb897310",
},
PortSecurityDisabled = true,
},
},
MetadataMap =
{
{ "some_key", "some_value" },
{ "stage", "dev" },
},
Configurations = new[]
{
new Edgecenter.Inputs.InstanceConfigurationArgs
{
Key = "some_key",
Value = "some_data",
},
},
RegionId = 1,
ProjectId = 1,
});
//***
// another one example with one interface to private network and fip to internet
//***
var fixedIp = new Edgecenter.Reservedfixedip("fixedIp", new()
{
ProjectId = 1,
RegionId = 1,
Type = "ip_address",
NetworkId = "faf6507b-1ff1-4ebf-b540-befd5c09fe06",
FixedIpAddress = "192.168.13.6",
IsVip = false,
});
var firstVolumeIndex_volumeVolume = new Edgecenter.Volume("firstVolumeIndex/volumeVolume", new()
{
TypeName = "ssd_hiiops",
Size = 10,
ImageId = "6dc4e061-6fab-41f3-91a3-0ba848fb32d9",
ProjectId = 1,
RegionId = 1,
});
var fip = new Edgecenter.Floatingip("fip", new()
{
ProjectId = 1,
RegionId = 1,
FixedIpAddress = fixedIp.FixedIpAddress,
PortId = fixedIp.PortId,
});
var index_instanceInstance = new Edgecenter.Instance("index/instanceInstance", new()
{
ProjectId = 1,
RegionId = 1,
FlavorId = "g1-standard-1-2",
Volumes = new[]
{
new Edgecenter.Inputs.InstanceVolumeArgs
{
Source = "existing-volume",
VolumeId = firstVolumeVolume.VolumeId,
BootIndex = 0,
},
},
Interfaces = new[]
{
new Edgecenter.Inputs.InstanceInterfaceArgs
{
Type = "reserved_fixed_ip",
PortId = fixedIp.PortId,
FipSource = "existing",
ExistingFipId = fip.FloatingipId,
SecurityGroups = new[]
{
"ada84751-fcca-4491-9249-2dfceb321616",
},
},
},
});
});
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.Instance;
import com.pulumi.edgecenter.InstanceArgs;
import com.pulumi.edgecenter.inputs.InstanceVolumeArgs;
import com.pulumi.edgecenter.inputs.InstanceInterfaceArgs;
import com.pulumi.edgecenter.inputs.InstanceConfigurationArgs;
import com.pulumi.edgecenter.Reservedfixedip;
import com.pulumi.edgecenter.ReservedfixedipArgs;
import com.pulumi.edgecenter.Floatingip;
import com.pulumi.edgecenter.FloatingipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var network = new Network("network", NetworkArgs.builder()
.type("vxlan")
.regionId(1)
.projectId(1)
.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(1)
.projectId(1)
.build());
var firstVolumeVolume = new Volume("firstVolumeVolume", VolumeArgs.builder()
.typeName("ssd_hiiops")
.size(5)
.imageId("f4ce3d30-e29c-4cfd-811f-46f383b6081f")
.regionId(1)
.projectId(1)
.build());
var secondVolume = new Volume("secondVolume", VolumeArgs.builder()
.typeName("ssd_hiiops")
.size(5)
.regionId(1)
.projectId(1)
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.flavorId("g1-standard-2-4")
.volumes(
InstanceVolumeArgs.builder()
.source("existing-volume")
.volumeId(firstVolumeVolume.volumeId())
.bootIndex(0)
.build(),
InstanceVolumeArgs.builder()
.source("existing-volume")
.volumeId(secondVolume.volumeId())
.bootIndex(1)
.build())
.interfaces(InstanceInterfaceArgs.builder()
.type("subnet")
.networkId(network.networkId())
.subnetId(subnet.subnetId())
.securityGroups("d75db0b2-58f1-4a11-88c6-a932bb897310")
.portSecurityDisabled(true)
.build())
.metadataMap(Map.ofEntries(
Map.entry("some_key", "some_value"),
Map.entry("stage", "dev")
))
.configurations(InstanceConfigurationArgs.builder()
.key("some_key")
.value("some_data")
.build())
.regionId(1)
.projectId(1)
.build());
//***
// another one example with one interface to private network and fip to internet
//***
var fixedIp = new Reservedfixedip("fixedIp", ReservedfixedipArgs.builder()
.projectId(1)
.regionId(1)
.type("ip_address")
.networkId("faf6507b-1ff1-4ebf-b540-befd5c09fe06")
.fixedIpAddress("192.168.13.6")
.isVip(false)
.build());
var firstVolumeIndex_volumeVolume = new Volume("firstVolumeIndex/volumeVolume", VolumeArgs.builder()
.typeName("ssd_hiiops")
.size(10)
.imageId("6dc4e061-6fab-41f3-91a3-0ba848fb32d9")
.projectId(1)
.regionId(1)
.build());
var fip = new Floatingip("fip", FloatingipArgs.builder()
.projectId(1)
.regionId(1)
.fixedIpAddress(fixedIp.fixedIpAddress())
.portId(fixedIp.portId())
.build());
var index_instanceInstance = new Instance("index/instanceInstance", InstanceArgs.builder()
.projectId(1)
.regionId(1)
.flavorId("g1-standard-1-2")
.volumes(InstanceVolumeArgs.builder()
.source("existing-volume")
.volumeId(firstVolumeVolume.volumeId())
.bootIndex(0)
.build())
.interfaces(InstanceInterfaceArgs.builder()
.type("reserved_fixed_ip")
.portId(fixedIp.portId())
.fipSource("existing")
.existingFipId(fip.floatingipId())
.securityGroups("ada84751-fcca-4491-9249-2dfceb321616")
.build())
.build());
}
}
resources:
network:
type: edgecenter:Network
properties:
type: vxlan
regionId: 1
projectId: 1
subnet:
type: edgecenter:Subnet
properties:
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: 1
projectId: 1
firstVolumeVolume:
type: edgecenter:Volume
properties:
typeName: ssd_hiiops
size: 5
imageId: f4ce3d30-e29c-4cfd-811f-46f383b6081f
regionId: 1
projectId: 1
secondVolume:
type: edgecenter:Volume
properties:
typeName: ssd_hiiops
size: 5
regionId: 1
projectId: 1
instance: # ***
# // another one example with one interface to private network and fip to internet
# //***
type: edgecenter:Instance
properties:
flavorId: g1-standard-2-4
volumes:
- source: existing-volume
volumeId: ${firstVolumeVolume.volumeId}
bootIndex: 0
- source: existing-volume
volumeId: ${secondVolume.volumeId}
bootIndex: 1
interfaces:
- type: subnet
networkId: ${network.networkId}
subnetId: ${subnet.subnetId}
securityGroups:
- d75db0b2-58f1-4a11-88c6-a932bb897310
portSecurityDisabled: true
metadataMap:
some_key: some_value
stage: dev
configurations:
- key: some_key
value: some_data
regionId: 1
projectId: 1
fixedIp:
type: edgecenter:Reservedfixedip
properties:
projectId: 1
regionId: 1
type: ip_address
networkId: faf6507b-1ff1-4ebf-b540-befd5c09fe06
fixedIpAddress: 192.168.13.6
isVip: false
firstVolumeIndex/volumeVolume:
type: edgecenter:Volume
properties:
typeName: ssd_hiiops
size: 10
imageId: 6dc4e061-6fab-41f3-91a3-0ba848fb32d9
projectId: 1
regionId: 1
fip:
type: edgecenter:Floatingip
properties:
projectId: 1
regionId: 1
fixedIpAddress: ${fixedIp.fixedIpAddress}
portId: ${fixedIp.portId}
index/instanceInstance:
type: edgecenter:Instance
properties:
projectId: 1
regionId: 1
flavorId: g1-standard-1-2
volumes:
- source: existing-volume
volumeId: ${firstVolumeVolume.volumeId}
bootIndex: 0
interfaces:
- type: reserved_fixed_ip
portId: ${fixedIp.portId}
fipSource: existing
existingFipId: ${fip.floatingipId}
securityGroups:
- ada84751-fcca-4491-9249-2dfceb321616
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
flavor_id: Optional[str] = None,
volumes: Optional[Sequence[InstanceVolumeArgs]] = None,
interfaces: Optional[Sequence[InstanceInterfaceArgs]] = None,
name_template: Optional[str] = None,
password: Optional[str] = None,
instance_id: Optional[str] = None,
configurations: Optional[Sequence[InstanceConfigurationArgs]] = None,
keypair_name: Optional[str] = None,
last_updated: Optional[str] = None,
metadata_map: Optional[Mapping[str, str]] = None,
metadatas: Optional[Sequence[InstanceMetadataArgs]] = None,
name: Optional[str] = None,
addresses: Optional[Sequence[InstanceAddressArgs]] = None,
name_templates: Optional[Sequence[str]] = None,
flavor: Optional[Mapping[str, 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,
userdata: Optional[str] = None,
username: Optional[str] = None,
vm_state: Optional[str] = None,
allow_app_ports: Optional[bool] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: edgecenter:Instance
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 InstanceArgs
- 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 InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- 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 instanceResource = new Edgecenter.Instance("instanceResource", new()
{
FlavorId = "string",
Volumes = new[]
{
new Edgecenter.Inputs.InstanceVolumeArgs
{
Source = "string",
AttachmentTag = "string",
BootIndex = 0,
DeleteOnTermination = false,
Id = "string",
ImageId = "string",
Name = "string",
Size = 0,
TypeName = "string",
VolumeId = "string",
},
},
Interfaces = new[]
{
new Edgecenter.Inputs.InstanceInterfaceArgs
{
ExistingFipId = "string",
FipSource = "string",
IpAddress = "string",
NetworkId = "string",
Order = 0,
PortId = "string",
PortSecurityDisabled = false,
SecurityGroups = new[]
{
"string",
},
SubnetId = "string",
Type = "string",
},
},
NameTemplate = "string",
Password = "string",
InstanceId = "string",
Configurations = new[]
{
new Edgecenter.Inputs.InstanceConfigurationArgs
{
Key = "string",
Value = "string",
},
},
KeypairName = "string",
LastUpdated = "string",
MetadataMap =
{
{ "string", "string" },
},
Name = "string",
Addresses = new[]
{
new Edgecenter.Inputs.InstanceAddressArgs
{
Nets = new[]
{
new Edgecenter.Inputs.InstanceAddressNetArgs
{
Addr = "string",
Type = "string",
},
},
},
},
Flavor =
{
{ "string", "string" },
},
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
ServerGroup = "string",
Status = "string",
UserData = "string",
Username = "string",
VmState = "string",
AllowAppPorts = false,
});
example, err := edgecenter.NewInstance(ctx, "instanceResource", &edgecenter.InstanceArgs{
FlavorId: pulumi.String("string"),
Volumes: edgecenter.InstanceVolumeArray{
&edgecenter.InstanceVolumeArgs{
Source: pulumi.String("string"),
AttachmentTag: pulumi.String("string"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(false),
Id: pulumi.String("string"),
ImageId: pulumi.String("string"),
Name: pulumi.String("string"),
Size: pulumi.Float64(0),
TypeName: pulumi.String("string"),
VolumeId: pulumi.String("string"),
},
},
Interfaces: edgecenter.InstanceInterfaceArray{
&edgecenter.InstanceInterfaceArgs{
ExistingFipId: pulumi.String("string"),
FipSource: pulumi.String("string"),
IpAddress: pulumi.String("string"),
NetworkId: pulumi.String("string"),
Order: pulumi.Float64(0),
PortId: pulumi.String("string"),
PortSecurityDisabled: pulumi.Bool(false),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SubnetId: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
NameTemplate: pulumi.String("string"),
Password: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Configurations: edgecenter.InstanceConfigurationArray{
&edgecenter.InstanceConfigurationArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
KeypairName: pulumi.String("string"),
LastUpdated: pulumi.String("string"),
MetadataMap: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Addresses: edgecenter.InstanceAddressArray{
&edgecenter.InstanceAddressArgs{
Nets: edgecenter.InstanceAddressNetArray{
&edgecenter.InstanceAddressNetArgs{
Addr: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
},
},
Flavor: pulumi.StringMap{
"string": pulumi.String("string"),
},
ProjectId: pulumi.Float64(0),
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"),
AllowAppPorts: pulumi.Bool(false),
})
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
.flavorId("string")
.volumes(InstanceVolumeArgs.builder()
.source("string")
.attachmentTag("string")
.bootIndex(0)
.deleteOnTermination(false)
.id("string")
.imageId("string")
.name("string")
.size(0)
.typeName("string")
.volumeId("string")
.build())
.interfaces(InstanceInterfaceArgs.builder()
.existingFipId("string")
.fipSource("string")
.ipAddress("string")
.networkId("string")
.order(0)
.portId("string")
.portSecurityDisabled(false)
.securityGroups("string")
.subnetId("string")
.type("string")
.build())
.nameTemplate("string")
.password("string")
.instanceId("string")
.configurations(InstanceConfigurationArgs.builder()
.key("string")
.value("string")
.build())
.keypairName("string")
.lastUpdated("string")
.metadataMap(Map.of("string", "string"))
.name("string")
.addresses(InstanceAddressArgs.builder()
.nets(InstanceAddressNetArgs.builder()
.addr("string")
.type("string")
.build())
.build())
.flavor(Map.of("string", "string"))
.projectId(0)
.projectName("string")
.regionId(0)
.regionName("string")
.serverGroup("string")
.status("string")
.userData("string")
.username("string")
.vmState("string")
.allowAppPorts(false)
.build());
instance_resource = edgecenter.Instance("instanceResource",
flavor_id="string",
volumes=[{
"source": "string",
"attachment_tag": "string",
"boot_index": 0,
"delete_on_termination": False,
"id": "string",
"image_id": "string",
"name": "string",
"size": 0,
"type_name": "string",
"volume_id": "string",
}],
interfaces=[{
"existing_fip_id": "string",
"fip_source": "string",
"ip_address": "string",
"network_id": "string",
"order": 0,
"port_id": "string",
"port_security_disabled": False,
"security_groups": ["string"],
"subnet_id": "string",
"type": "string",
}],
name_template="string",
password="string",
instance_id="string",
configurations=[{
"key": "string",
"value": "string",
}],
keypair_name="string",
last_updated="string",
metadata_map={
"string": "string",
},
name="string",
addresses=[{
"nets": [{
"addr": "string",
"type": "string",
}],
}],
flavor={
"string": "string",
},
project_id=0,
project_name="string",
region_id=0,
region_name="string",
server_group="string",
status="string",
user_data="string",
username="string",
vm_state="string",
allow_app_ports=False)
const instanceResource = new edgecenter.Instance("instanceResource", {
flavorId: "string",
volumes: [{
source: "string",
attachmentTag: "string",
bootIndex: 0,
deleteOnTermination: false,
id: "string",
imageId: "string",
name: "string",
size: 0,
typeName: "string",
volumeId: "string",
}],
interfaces: [{
existingFipId: "string",
fipSource: "string",
ipAddress: "string",
networkId: "string",
order: 0,
portId: "string",
portSecurityDisabled: false,
securityGroups: ["string"],
subnetId: "string",
type: "string",
}],
nameTemplate: "string",
password: "string",
instanceId: "string",
configurations: [{
key: "string",
value: "string",
}],
keypairName: "string",
lastUpdated: "string",
metadataMap: {
string: "string",
},
name: "string",
addresses: [{
nets: [{
addr: "string",
type: "string",
}],
}],
flavor: {
string: "string",
},
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
serverGroup: "string",
status: "string",
userData: "string",
username: "string",
vmState: "string",
allowAppPorts: false,
});
type: edgecenter:Instance
properties:
addresses:
- nets:
- addr: string
type: string
allowAppPorts: false
configurations:
- key: string
value: string
flavor:
string: string
flavorId: string
instanceId: string
interfaces:
- existingFipId: string
fipSource: string
ipAddress: string
networkId: string
order: 0
portId: string
portSecurityDisabled: false
securityGroups:
- string
subnetId: string
type: string
keypairName: string
lastUpdated: string
metadataMap:
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
volumes:
- attachmentTag: string
bootIndex: 0
deleteOnTermination: false
id: string
imageId: string
name: string
size: 0
source: string
typeName: string
volumeId: string
Instance 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 Instance resource accepts the following input properties:
- 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
Interface> - A list defining the network interfaces to be attached to the instance.
- Volumes
List<Instance
Volume> - A set defining the volumes to be attached to the instance.
- Addresses
List<Instance
Address> - A list of network addresses associated with the instance, for example "pub_net": [...]
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
List<Instance
Configuration> - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- Flavor Dictionary<string, string>
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- Instance
Id string - The ID of this resource.
- Keypair
Name string - The name of the key pair to be associated with the instance for SSH access.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map Dictionary<string, string> - A map containing metadata, for example tags.
- Metadatas
List<Instance
Metadata> - 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'.
- Name
Templates List<string> - 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.
- Userdata string
- Deprecated
- 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.
- 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
Interface Args - A list defining the network interfaces to be attached to the instance.
- Volumes
[]Instance
Volume Args - A set defining the volumes to be attached to the instance.
- Addresses
[]Instance
Address Args - A list of network addresses associated with the instance, for example "pub_net": [...]
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
[]Instance
Configuration Args - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- Flavor map[string]string
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- Instance
Id string - The ID of this resource.
- Keypair
Name string - The name of the key pair to be associated with the instance for SSH access.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map map[string]string - A map containing metadata, for example tags.
- Metadatas
[]Instance
Metadata Args - 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'.
- Name
Templates []string - 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.
- Userdata string
- Deprecated
- 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.
- 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
Interface> - A list defining the network interfaces to be attached to the instance.
- volumes
List<Instance
Volume> - A set defining the volumes to be attached to the instance.
- addresses
List<Instance
Address> - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow
App BooleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
List<Instance
Configuration> - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- flavor Map<String,String>
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- instance
Id String - The ID of this resource.
- keypair
Name String - The name of the key pair to be associated with the instance for SSH access.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String,String> - A map containing metadata, for example tags.
- metadatas
List<Instance
Metadata> - 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'.
- name
Templates List<String> - 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.
- userdata String
- Deprecated
- 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.
- 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
Interface[] - A list defining the network interfaces to be attached to the instance.
- volumes
Instance
Volume[] - A set defining the volumes to be attached to the instance.
- addresses
Instance
Address[] - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow
App booleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
Instance
Configuration[] - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- flavor {[key: string]: string}
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- instance
Id string - The ID of this resource.
- keypair
Name string - The name of the key pair to be associated with the instance for SSH access.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata
Map {[key: string]: string} - A map containing metadata, for example tags.
- metadatas
Instance
Metadata[] - 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'.
- name
Templates string[] - 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.
- userdata string
- Deprecated
- 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.
- 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
Interface Args] - A list defining the network interfaces to be attached to the instance.
- volumes
Sequence[Instance
Volume Args] - A set defining the volumes to be attached to the instance.
- addresses
Sequence[Instance
Address Args] - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow_
app_ boolports - A boolean indicating whether to allow application ports on the instance.
- configurations
Sequence[Instance
Configuration Args] - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- flavor Mapping[str, str]
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- instance_
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.
- last_
updated str - The timestamp of the last update (use with update context).
- metadata_
map Mapping[str, str] - A map containing metadata, for example tags.
- metadatas
Sequence[Instance
Metadata Args] - 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'.
- name_
templates Sequence[str] - 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.
- userdata str
- Deprecated
- 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.
- 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.
- volumes List<Property Map>
- A set defining the volumes to be attached to the instance.
- addresses List<Property Map>
- A list of network addresses associated with the instance, for example "pub_net": [...]
- 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/..."}
- flavor Map<String>
- A map defining the flavor of the instance, for example, {"flavor_name": "g1-standard-2-4", "ram": 4096, ...}.
- instance
Id String - The ID of this resource.
- keypair
Name String - The name of the key pair to be associated with the instance for SSH access.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String> - A map containing metadata, for example tags.
- metadatas List<Property Map>
- 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'.
- name
Templates List<String> - 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.
- userdata String
- Deprecated
- 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 Instance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Groups List<InstanceSecurity Group> - A list of firewall configurations applied to the instance, defined by their ID and name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Groups []InstanceSecurity Group - A list of firewall configurations applied to the instance, defined by their ID and name.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Groups List<InstanceSecurity Group> - A list of firewall configurations applied to the instance, defined by their ID and name.
- id string
- The provider-assigned unique ID for this managed resource.
- security
Groups InstanceSecurity Group[] - A list of firewall configurations applied to the instance, defined by their ID and name.
- id str
- The provider-assigned unique ID for this managed resource.
- security_
groups Sequence[InstanceSecurity Group] - A list of firewall configurations applied to the instance, defined by their ID and name.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Groups List<Property Map> - A list of firewall configurations applied to the instance, defined by their ID and name.
Look up Existing Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Sequence[InstanceAddressArgs]] = None,
allow_app_ports: Optional[bool] = None,
configurations: Optional[Sequence[InstanceConfigurationArgs]] = None,
flavor: Optional[Mapping[str, str]] = None,
flavor_id: Optional[str] = None,
instance_id: Optional[str] = None,
interfaces: Optional[Sequence[InstanceInterfaceArgs]] = None,
keypair_name: Optional[str] = None,
last_updated: Optional[str] = None,
metadata_map: Optional[Mapping[str, str]] = None,
metadatas: Optional[Sequence[InstanceMetadataArgs]] = None,
name: Optional[str] = None,
name_template: Optional[str] = None,
name_templates: Optional[Sequence[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,
security_groups: Optional[Sequence[InstanceSecurityGroupArgs]] = None,
server_group: Optional[str] = None,
status: Optional[str] = None,
user_data: Optional[str] = None,
userdata: Optional[str] = None,
username: Optional[str] = None,
vm_state: Optional[str] = None,
volumes: Optional[Sequence[InstanceVolumeArgs]] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
resources: _: type: edgecenter:Instance 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.
- Addresses
List<Instance
Address> - A list of network addresses associated with the instance, for example "pub_net": [...]
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
List<Instance
Configuration> - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- 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
Id string - The ID of this resource.
- Interfaces
List<Instance
Interface> - 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.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map Dictionary<string, string> - A map containing metadata, for example tags.
- Metadatas
List<Instance
Metadata> - 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'.
- Name
Templates List<string> - 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.
- Security
Groups List<InstanceSecurity Group> - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- Userdata string
- Deprecated
- 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.
- Volumes
List<Instance
Volume> - A set defining the volumes to be attached to the instance.
- Addresses
[]Instance
Address Args - A list of network addresses associated with the instance, for example "pub_net": [...]
- Allow
App boolPorts - A boolean indicating whether to allow application ports on the instance.
- Configurations
[]Instance
Configuration Args - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- 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
Id string - The ID of this resource.
- Interfaces
[]Instance
Interface 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.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map map[string]string - A map containing metadata, for example tags.
- Metadatas
[]Instance
Metadata Args - 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'.
- Name
Templates []string - 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.
- Security
Groups []InstanceSecurity Group Args - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- Userdata string
- Deprecated
- 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.
- Volumes
[]Instance
Volume Args - A set defining the volumes to be attached to the instance.
- addresses
List<Instance
Address> - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow
App BooleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
List<Instance
Configuration> - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- 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
Id String - The ID of this resource.
- interfaces
List<Instance
Interface> - 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.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String,String> - A map containing metadata, for example tags.
- metadatas
List<Instance
Metadata> - 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'.
- name
Templates List<String> - 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.
- security
Groups List<InstanceSecurity Group> - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- userdata String
- Deprecated
- 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.
- volumes
List<Instance
Volume> - A set defining the volumes to be attached to the instance.
- addresses
Instance
Address[] - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow
App booleanPorts - A boolean indicating whether to allow application ports on the instance.
- configurations
Instance
Configuration[] - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- 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
Id string - The ID of this resource.
- interfaces
Instance
Interface[] - 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.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata
Map {[key: string]: string} - A map containing metadata, for example tags.
- metadatas
Instance
Metadata[] - 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'.
- name
Templates string[] - 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.
- security
Groups InstanceSecurity Group[] - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- userdata string
- Deprecated
- 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.
- volumes
Instance
Volume[] - A set defining the volumes to be attached to the instance.
- addresses
Sequence[Instance
Address Args] - A list of network addresses associated with the instance, for example "pub_net": [...]
- allow_
app_ boolports - A boolean indicating whether to allow application ports on the instance.
- configurations
Sequence[Instance
Configuration Args] - A list of key-value pairs specifying configuration settings for the instance when created from a template (marketplace), e.g. {"gitlabexternalurl": "https://gitlab/..."}
- 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_
id str - The ID of this resource.
- interfaces
Sequence[Instance
Interface 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.
- last_
updated str - The timestamp of the last update (use with update context).
- metadata_
map Mapping[str, str] - A map containing metadata, for example tags.
- metadatas
Sequence[Instance
Metadata Args] - 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'.
- name_
templates Sequence[str] - 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.
- security_
groups Sequence[InstanceSecurity Group Args] - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- userdata str
- Deprecated
- 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.
- volumes
Sequence[Instance
Volume Args] - A set defining the volumes to be attached to the instance.
- addresses List<Property Map>
- A list of network addresses associated with the instance, for example "pub_net": [...]
- 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/..."}
- 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
Id 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.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String> - A map containing metadata, for example tags.
- metadatas List<Property Map>
- 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'.
- name
Templates List<String> - 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.
- security
Groups List<Property Map> - A list of firewall configurations applied to the instance, defined by their ID and name.
- 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.
- userdata String
- Deprecated
- 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.
- volumes List<Property Map>
- A set defining the volumes to be attached to the instance.
Supporting Types
InstanceAddress, InstanceAddressArgs
InstanceAddressNet, InstanceAddressNetArgs
InstanceConfiguration, InstanceConfigurationArgs
InstanceInterface, InstanceInterfaceArgs
- Existing
Fip stringId - Fip
Source string - Ip
Address string - Network
Id string - Required if type is 'subnet' or 'any_subnet'.
- Order double
- Order of attaching interface
- Port
Id string - required if type is 'reservedfixedip'
- Port
Security boolDisabled - Security
Groups List<string> - list of security group IDs
- Subnet
Id string - Required if type is 'subnet'.
- Type string
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
- Existing
Fip stringId - Fip
Source string - Ip
Address string - Network
Id string - Required if type is 'subnet' or 'any_subnet'.
- Order float64
- Order of attaching interface
- Port
Id string - required if type is 'reservedfixedip'
- Port
Security boolDisabled - Security
Groups []string - list of security group IDs
- Subnet
Id string - Required if type is 'subnet'.
- Type string
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
- existing
Fip StringId - fip
Source String - ip
Address String - network
Id String - Required if type is 'subnet' or 'any_subnet'.
- order Double
- Order of attaching interface
- port
Id String - required if type is 'reservedfixedip'
- port
Security BooleanDisabled - security
Groups List<String> - list of security group IDs
- subnet
Id String - Required if type is 'subnet'.
- type String
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
- existing
Fip stringId - fip
Source string - ip
Address string - network
Id string - Required if type is 'subnet' or 'any_subnet'.
- order number
- Order of attaching interface
- port
Id string - required if type is 'reservedfixedip'
- port
Security booleanDisabled - security
Groups string[] - list of security group IDs
- subnet
Id string - Required if type is 'subnet'.
- type string
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
- existing_
fip_ strid - fip_
source str - ip_
address str - network_
id str - Required if type is 'subnet' or 'any_subnet'.
- order float
- Order of attaching interface
- port_
id str - required if type is 'reservedfixedip'
- port_
security_ booldisabled - security_
groups Sequence[str] - list of security group IDs
- subnet_
id str - Required if type is 'subnet'.
- type str
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
- existing
Fip StringId - fip
Source String - ip
Address String - network
Id String - Required if type is 'subnet' or 'any_subnet'.
- order Number
- Order of attaching interface
- port
Id String - required if type is 'reservedfixedip'
- port
Security BooleanDisabled - security
Groups List<String> - list of security group IDs
- subnet
Id String - Required if type is 'subnet'.
- type String
- Available value is 'subnet', 'anysubnet', 'external', 'reservedfixed_ip'
InstanceMetadata, InstanceMetadataArgs
InstanceSecurityGroup, InstanceSecurityGroupArgs
InstanceVolume, InstanceVolumeArgs
- Source string
- Currently available only 'existing-volume' value
- Attachment
Tag string - Boot
Index double - If boot_index==0 volumes can not detached
- Delete
On boolTermination - Id string
- Image
Id string - 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
- Source string
- Currently available only 'existing-volume' value
- Attachment
Tag string - Boot
Index float64 - If boot_index==0 volumes can not detached
- Delete
On boolTermination - Id string
- Image
Id string - 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
- source String
- Currently available only 'existing-volume' value
- attachment
Tag String - boot
Index Double - If boot_index==0 volumes can not detached
- delete
On BooleanTermination - id String
- image
Id String - 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
- source string
- Currently available only 'existing-volume' value
- attachment
Tag string - boot
Index number - If boot_index==0 volumes can not detached
- delete
On booleanTermination - id string
- image
Id string - 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 string
- source str
- Currently available only 'existing-volume' value
- attachment_
tag str - boot_
index float - If boot_index==0 volumes can not detached
- delete_
on_ booltermination - id str
- image_
id str - 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 str
- source String
- Currently available only 'existing-volume' value
- attachment
Tag String - boot
Index Number - If boot_index==0 volumes can not detached
- delete
On BooleanTermination - id String
- image
Id String - 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 String
Import
import using <project_id>:<region_id>:<instance_id> format
$ pulumi import edgecenter:index/instance:Instance 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.