opentelekomcloud.ComputeInstanceV2
Explore with Pulumi AI
Up-to-date reference of API arguments for ECS management you can get at documentation portal
Manages a V2 VM instance resource within OpenTelekomCloud.
NOTE: Compute v2 API that are used in this resource aren’t officially supported on SwissCloud.
Example Usage
Basic Instance
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const basic = new opentelekomcloud.ComputeInstanceV2("basic", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [{
name: "my_network",
}],
metadata: {
"this": "that",
},
tags: {
muh: "kuh",
},
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
basic = opentelekomcloud.ComputeInstanceV2("basic",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[{
"name": "my_network",
}],
metadata={
"this": "that",
},
tags={
"muh": "kuh",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "basic", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_network"),
},
},
Metadata: pulumi.StringMap{
"this": pulumi.String("that"),
},
Tags: pulumi.StringMap{
"muh": pulumi.String("kuh"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var basic = new Opentelekomcloud.ComputeInstanceV2("basic", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_network",
},
},
Metadata =
{
{ "this", "that" },
},
Tags =
{
{ "muh", "kuh" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
var basic = new ComputeInstanceV2("basic", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(ComputeInstanceV2NetworkArgs.builder()
.name("my_network")
.build())
.metadata(Map.of("this", "that"))
.tags(Map.of("muh", "kuh"))
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
basic:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- name: my_network
metadata:
this: that
tags:
muh: kuh
Instance With Attached Volume
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const myvol = new opentelekomcloud.BlockstorageVolumeV2("myvol", {size: 4});
const myinstance = new opentelekomcloud.ComputeInstanceV2("myinstance", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [{
name: "my_network",
}],
});
const attached = new opentelekomcloud.ComputeVolumeAttachV2("attached", {
instanceId: myinstance.computeInstanceV2Id,
volumeId: myvol.blockstorageVolumeV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
myvol = opentelekomcloud.BlockstorageVolumeV2("myvol", size=4)
myinstance = opentelekomcloud.ComputeInstanceV2("myinstance",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[{
"name": "my_network",
}])
attached = opentelekomcloud.ComputeVolumeAttachV2("attached",
instance_id=myinstance.compute_instance_v2_id,
volume_id=myvol.blockstorage_volume_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
myvol, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "myvol", &opentelekomcloud.BlockstorageVolumeV2Args{
Size: pulumi.Float64(4),
})
if err != nil {
return err
}
myinstance, err := opentelekomcloud.NewComputeInstanceV2(ctx, "myinstance", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_network"),
},
},
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewComputeVolumeAttachV2(ctx, "attached", &opentelekomcloud.ComputeVolumeAttachV2Args{
InstanceId: myinstance.ComputeInstanceV2Id,
VolumeId: myvol.BlockstorageVolumeV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var myvol = new Opentelekomcloud.BlockstorageVolumeV2("myvol", new()
{
Size = 4,
});
var myinstance = new Opentelekomcloud.ComputeInstanceV2("myinstance", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_network",
},
},
});
var attached = new Opentelekomcloud.ComputeVolumeAttachV2("attached", new()
{
InstanceId = myinstance.ComputeInstanceV2Id,
VolumeId = myvol.BlockstorageVolumeV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2;
import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
var myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
.size(4)
.build());
var myinstance = new ComputeInstanceV2("myinstance", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(ComputeInstanceV2NetworkArgs.builder()
.name("my_network")
.build())
.build());
var attached = new ComputeVolumeAttachV2("attached", ComputeVolumeAttachV2Args.builder()
.instanceId(myinstance.computeInstanceV2Id())
.volumeId(myvol.blockstorageVolumeV2Id())
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
myvol:
type: opentelekomcloud:BlockstorageVolumeV2
properties:
size: 4
myinstance:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- name: my_network
attached:
type: opentelekomcloud:ComputeVolumeAttachV2
properties:
instanceId: ${myinstance.computeInstanceV2Id}
volumeId: ${myvol.blockstorageVolumeV2Id}
Boot From Volume
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [{
uuid: imageId,
sourceType: "image",
volumeSize: 5,
bootIndex: 0,
destinationType: "volume",
deleteOnTermination: true,
volumeType: "SSD",
}],
networks: [{
name: "my_network",
}],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[{
"uuid": image_id,
"source_type": "image",
"volume_size": 5,
"boot_index": 0,
"destination_type": "volume",
"delete_on_termination": True,
"volume_type": "SSD",
}],
networks=[{
"name": "my_network",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.Any(imageId),
SourceType: pulumi.String("image"),
VolumeSize: pulumi.Float64(5),
BootIndex: pulumi.Float64(0),
DestinationType: pulumi.String("volume"),
DeleteOnTermination: pulumi.Bool(true),
VolumeType: pulumi.String("SSD"),
},
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_network"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
{
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = imageId,
SourceType = "image",
VolumeSize = 5,
BootIndex = 0,
DestinationType = "volume",
DeleteOnTermination = true,
VolumeType = "SSD",
},
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_network",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(imageId)
.sourceType("image")
.volumeSize(5)
.bootIndex(0)
.destinationType("volume")
.deleteOnTermination(true)
.volumeType("SSD")
.build())
.networks(ComputeInstanceV2NetworkArgs.builder()
.name("my_network")
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
boot-from-volume:
type: opentelekomcloud:ComputeInstanceV2
properties:
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: ${imageId}
sourceType: image
volumeSize: 5
bootIndex: 0
destinationType: volume
deleteOnTermination: true
volumeType: SSD
networks:
- name: my_network
Boot From an Existing Volume
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const myvol = new opentelekomcloud.BlockstorageVolumeV2("myvol", {
size: 5,
imageId: imageId,
});
const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [{
uuid: myvol.blockstorageVolumeV2Id,
sourceType: "volume",
bootIndex: 0,
destinationType: "volume",
deleteOnTermination: true,
}],
networks: [{
name: "my_network",
}],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
myvol = opentelekomcloud.BlockstorageVolumeV2("myvol",
size=5,
image_id=image_id)
boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[{
"uuid": myvol.blockstorage_volume_v2_id,
"source_type": "volume",
"boot_index": 0,
"destination_type": "volume",
"delete_on_termination": True,
}],
networks=[{
"name": "my_network",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
myvol, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "myvol", &opentelekomcloud.BlockstorageVolumeV2Args{
Size: pulumi.Float64(5),
ImageId: pulumi.Any(imageId),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: myvol.BlockstorageVolumeV2Id,
SourceType: pulumi.String("volume"),
BootIndex: pulumi.Float64(0),
DestinationType: pulumi.String("volume"),
DeleteOnTermination: pulumi.Bool(true),
},
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_network"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var myvol = new Opentelekomcloud.BlockstorageVolumeV2("myvol", new()
{
Size = 5,
ImageId = imageId,
});
var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
{
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = myvol.BlockstorageVolumeV2Id,
SourceType = "volume",
BootIndex = 0,
DestinationType = "volume",
DeleteOnTermination = true,
},
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_network",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
var myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
.size(5)
.imageId(imageId)
.build());
var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(myvol.blockstorageVolumeV2Id())
.sourceType("volume")
.bootIndex(0)
.destinationType("volume")
.deleteOnTermination(true)
.build())
.networks(ComputeInstanceV2NetworkArgs.builder()
.name("my_network")
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
myvol:
type: opentelekomcloud:BlockstorageVolumeV2
properties:
size: 5
imageId: ${imageId}
boot-from-volume:
type: opentelekomcloud:ComputeInstanceV2
properties:
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: ${myvol.blockstorageVolumeV2Id}
sourceType: volume
bootIndex: 0
destinationType: volume
deleteOnTermination: true
networks:
- name: my_network
Boot Instance, Create Volume, and Attach Volume as a Block Device
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const dataImageId = config.requireObject("dataImageId");
const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [
{
uuid: dataImageId,
sourceType: "image",
destinationType: "volume",
bootIndex: 0,
deleteOnTermination: true,
},
{
sourceType: "blank",
destinationType: "volume",
volumeSize: 1,
bootIndex: 1,
deleteOnTermination: true,
},
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
data_image_id = config.require_object("dataImageId")
instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[
{
"uuid": data_image_id,
"source_type": "image",
"destination_type": "volume",
"boot_index": 0,
"delete_on_termination": True,
},
{
"source_type": "blank",
"destination_type": "volume",
"volume_size": 1,
"boot_index": 1,
"delete_on_termination": True,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
dataImageId := cfg.RequireObject("dataImageId")
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.Any(dataImageId),
SourceType: pulumi.String("image"),
DestinationType: pulumi.String("volume"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
SourceType: pulumi.String("blank"),
DestinationType: pulumi.String("volume"),
VolumeSize: pulumi.Float64(1),
BootIndex: pulumi.Float64(1),
DeleteOnTermination: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var dataImageId = config.RequireObject<dynamic>("dataImageId");
var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = dataImageId,
SourceType = "image",
DestinationType = "volume",
BootIndex = 0,
DeleteOnTermination = true,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
SourceType = "blank",
DestinationType = "volume",
VolumeSize = 1,
BootIndex = 1,
DeleteOnTermination = true,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
final var dataImageId = config.get("dataImageId");
var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(dataImageId)
.sourceType("image")
.destinationType("volume")
.bootIndex(0)
.deleteOnTermination(true)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.sourceType("blank")
.destinationType("volume")
.volumeSize(1)
.bootIndex(1)
.deleteOnTermination(true)
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
dataImageId:
type: dynamic
resources:
instance1:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: ${dataImageId}
sourceType: image
destinationType: volume
bootIndex: 0
deleteOnTermination: true
- sourceType: blank
destinationType: volume
volumeSize: 1
bootIndex: 1
deleteOnTermination: true
Boot Instance and Attach Existing Volume as a Block Device
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const dataImageId = config.requireObject("dataImageId");
const volume1 = new opentelekomcloud.BlockstorageVolumeV2("volume1", {size: 1});
const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [
{
uuid: dataImageId,
sourceType: "image",
destinationType: "volume",
bootIndex: 0,
deleteOnTermination: true,
},
{
uuid: volume1.blockstorageVolumeV2Id,
sourceType: "volume",
destinationType: "volume",
bootIndex: 1,
deleteOnTermination: true,
},
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
data_image_id = config.require_object("dataImageId")
volume1 = opentelekomcloud.BlockstorageVolumeV2("volume1", size=1)
instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[
{
"uuid": data_image_id,
"source_type": "image",
"destination_type": "volume",
"boot_index": 0,
"delete_on_termination": True,
},
{
"uuid": volume1.blockstorage_volume_v2_id,
"source_type": "volume",
"destination_type": "volume",
"boot_index": 1,
"delete_on_termination": True,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
dataImageId := cfg.RequireObject("dataImageId")
volume1, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "volume1", &opentelekomcloud.BlockstorageVolumeV2Args{
Size: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.Any(dataImageId),
SourceType: pulumi.String("image"),
DestinationType: pulumi.String("volume"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: volume1.BlockstorageVolumeV2Id,
SourceType: pulumi.String("volume"),
DestinationType: pulumi.String("volume"),
BootIndex: pulumi.Float64(1),
DeleteOnTermination: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var dataImageId = config.RequireObject<dynamic>("dataImageId");
var volume1 = new Opentelekomcloud.BlockstorageVolumeV2("volume1", new()
{
Size = 1,
});
var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = dataImageId,
SourceType = "image",
DestinationType = "volume",
BootIndex = 0,
DeleteOnTermination = true,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = volume1.BlockstorageVolumeV2Id,
SourceType = "volume",
DestinationType = "volume",
BootIndex = 1,
DeleteOnTermination = true,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
final var dataImageId = config.get("dataImageId");
var volume1 = new BlockstorageVolumeV2("volume1", BlockstorageVolumeV2Args.builder()
.size(1)
.build());
var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(dataImageId)
.sourceType("image")
.destinationType("volume")
.bootIndex(0)
.deleteOnTermination(true)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(volume1.blockstorageVolumeV2Id())
.sourceType("volume")
.destinationType("volume")
.bootIndex(1)
.deleteOnTermination(true)
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
dataImageId:
type: dynamic
resources:
volume1:
type: opentelekomcloud:BlockstorageVolumeV2
properties:
size: 1
instance1:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: ${dataImageId}
sourceType: image
destinationType: volume
bootIndex: 0
deleteOnTermination: true
- uuid: ${volume1.blockstorageVolumeV2Id}
sourceType: volume
destinationType: volume
bootIndex: 1
deleteOnTermination: true
Instance With Multiple Networks
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const secondSubnet = opentelekomcloud.getVpcSubnetV1({
name: "my-subnet",
});
const myipNetworkingFloatingipV2 = new opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", {pool: "admin_external_net"});
const multi_net = new opentelekomcloud.ComputeInstanceV2("multi-net", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [
{
name: "my_first_network",
},
{
uuid: secondSubnet.then(secondSubnet => secondSubnet.networkId),
},
],
});
const myipComputeFloatingipAssociateV2 = new opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", {
floatingIp: myipNetworkingFloatingipV2.address,
instanceId: multi_net.computeInstanceV2Id,
fixedIp: multi_net.networks.apply(networks => networks?.[1]?.fixedIpV4),
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
second_subnet = opentelekomcloud.get_vpc_subnet_v1(name="my-subnet")
myip_networking_floatingip_v2 = opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", pool="admin_external_net")
multi_net = opentelekomcloud.ComputeInstanceV2("multi-net",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[
{
"name": "my_first_network",
},
{
"uuid": second_subnet.network_id,
},
])
myip_compute_floatingip_associate_v2 = opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2",
floating_ip=myip_networking_floatingip_v2.address,
instance_id=multi_net.compute_instance_v2_id,
fixed_ip=multi_net.networks[1].fixed_ip_v4)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
secondSubnet, err := opentelekomcloud.LookupVpcSubnetV1(ctx, &opentelekomcloud.LookupVpcSubnetV1Args{
Name: pulumi.StringRef("my-subnet"),
}, nil)
if err != nil {
return err
}
myipNetworkingFloatingipV2, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "myipNetworkingFloatingipV2", &opentelekomcloud.NetworkingFloatingipV2Args{
Pool: pulumi.String("admin_external_net"),
})
if err != nil {
return err
}
multi_net, err := opentelekomcloud.NewComputeInstanceV2(ctx, "multi-net", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_first_network"),
},
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.String(secondSubnet.NetworkId),
},
},
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewComputeFloatingipAssociateV2(ctx, "myipComputeFloatingipAssociateV2", &opentelekomcloud.ComputeFloatingipAssociateV2Args{
FloatingIp: myipNetworkingFloatingipV2.Address,
InstanceId: multi_net.ComputeInstanceV2Id,
FixedIp: pulumi.String(multi_net.Networks.ApplyT(func(networks []opentelekomcloud.ComputeInstanceV2Network) (*string, error) {
return &networks[1].FixedIpV4, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var secondSubnet = Opentelekomcloud.GetVpcSubnetV1.Invoke(new()
{
Name = "my-subnet",
});
var myipNetworkingFloatingipV2 = new Opentelekomcloud.NetworkingFloatingipV2("myipNetworkingFloatingipV2", new()
{
Pool = "admin_external_net",
});
var multi_net = new Opentelekomcloud.ComputeInstanceV2("multi-net", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_first_network",
},
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = secondSubnet.Apply(getVpcSubnetV1Result => getVpcSubnetV1Result.NetworkId),
},
},
});
var myipComputeFloatingipAssociateV2 = new Opentelekomcloud.ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", new()
{
FloatingIp = myipNetworkingFloatingipV2.Address,
InstanceId = multi_net.ComputeInstanceV2Id,
FixedIp = multi_net.Networks.Apply(networks => networks[1]?.FixedIpV4),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetVpcSubnetV1Args;
import com.pulumi.opentelekomcloud.NetworkingFloatingipV2;
import com.pulumi.opentelekomcloud.NetworkingFloatingipV2Args;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import com.pulumi.opentelekomcloud.ComputeFloatingipAssociateV2;
import com.pulumi.opentelekomcloud.ComputeFloatingipAssociateV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
final var secondSubnet = OpentelekomcloudFunctions.getVpcSubnetV1(GetVpcSubnetV1Args.builder()
.name("my-subnet")
.build());
var myipNetworkingFloatingipV2 = new NetworkingFloatingipV2("myipNetworkingFloatingipV2", NetworkingFloatingipV2Args.builder()
.pool("admin_external_net")
.build());
var multi_net = new ComputeInstanceV2("multi-net", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(
ComputeInstanceV2NetworkArgs.builder()
.name("my_first_network")
.build(),
ComputeInstanceV2NetworkArgs.builder()
.uuid(secondSubnet.applyValue(getVpcSubnetV1Result -> getVpcSubnetV1Result.networkId()))
.build())
.build());
var myipComputeFloatingipAssociateV2 = new ComputeFloatingipAssociateV2("myipComputeFloatingipAssociateV2", ComputeFloatingipAssociateV2Args.builder()
.floatingIp(myipNetworkingFloatingipV2.address())
.instanceId(multi_net.computeInstanceV2Id())
.fixedIp(multi_net.networks().applyValue(networks -> networks[1].fixedIpV4()))
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
myipNetworkingFloatingipV2:
type: opentelekomcloud:NetworkingFloatingipV2
properties:
pool: admin_external_net
multi-net:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- name: my_first_network
- uuid: ${secondSubnet.networkId}
myipComputeFloatingipAssociateV2:
type: opentelekomcloud:ComputeFloatingipAssociateV2
properties:
floatingIp: ${myipNetworkingFloatingipV2.address}
instanceId: ${["multi-net"].computeInstanceV2Id}
fixedIp: ${["multi-net"].networks[1].fixedIpV4}
variables:
secondSubnet:
fn::invoke:
function: opentelekomcloud:getVpcSubnetV1
arguments:
name: my-subnet
Instance with Multiple Ephemeral Disks
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const dataImageId = config.requireObject("dataImageId");
const multi_eph = new opentelekomcloud.ComputeInstanceV2("multi-eph", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [
{
bootIndex: 0,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "image",
uuid: dataImageId,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "blank",
volumeSize: 1,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "blank",
volumeSize: 1,
},
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
data_image_id = config.require_object("dataImageId")
multi_eph = opentelekomcloud.ComputeInstanceV2("multi-eph",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[
{
"boot_index": 0,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "image",
"uuid": data_image_id,
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "blank",
"volume_size": 1,
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "blank",
"volume_size": 1,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
dataImageId := cfg.RequireObject("dataImageId")
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "multi-eph", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("image"),
Uuid: pulumi.Any(dataImageId),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var dataImageId = config.RequireObject<dynamic>("dataImageId");
var multi_eph = new Opentelekomcloud.ComputeInstanceV2("multi-eph", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 0,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "image",
Uuid = dataImageId,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "blank",
VolumeSize = 1,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "blank",
VolumeSize = 1,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
final var dataImageId = config.get("dataImageId");
var multi_eph = new ComputeInstanceV2("multi-eph", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(0)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("image")
.uuid(dataImageId)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("blank")
.volumeSize(1)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("blank")
.volumeSize(1)
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
dataImageId:
type: dynamic
resources:
multi-eph:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- bootIndex: 0
deleteOnTermination: true
destinationType: volume
sourceType: image
uuid: ${dataImageId}
- bootIndex: -1
deleteOnTermination: true
destinationType: volume
sourceType: blank
volumeSize: 1
- bootIndex: -1
deleteOnTermination: true
destinationType: volume
sourceType: blank
volumeSize: 1
Instance with User Data (cloud-init)
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const imageId = config.requireObject("imageId");
const instance1 = new opentelekomcloud.ComputeInstanceV2("instance1", {
imageId: imageId,
flavorId: "s2.large.4",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
userData: `#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com`,
networks: [{
name: "my_network",
}],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
image_id = config.require_object("imageId")
instance1 = opentelekomcloud.ComputeInstanceV2("instance1",
image_id=image_id,
flavor_id="s2.large.4",
key_pair="my_key_pair_name",
security_groups=["default"],
user_data="""#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com""",
networks=[{
"name": "my_network",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
imageId := cfg.RequireObject("imageId")
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance1", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(imageId),
FlavorId: pulumi.String("s2.large.4"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
UserData: pulumi.String("#cloud-config\nhostname: instance_1.example.com\nfqdn: instance_1.example.com"),
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.String("my_network"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var imageId = config.RequireObject<dynamic>("imageId");
var instance1 = new Opentelekomcloud.ComputeInstanceV2("instance1", new()
{
ImageId = imageId,
FlavorId = "s2.large.4",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
UserData = @"#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com",
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = "my_network",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var imageId = config.get("imageId");
var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.imageId(imageId)
.flavorId("s2.large.4")
.keyPair("my_key_pair_name")
.securityGroups("default")
.userData("""
#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com """)
.networks(ComputeInstanceV2NetworkArgs.builder()
.name("my_network")
.build())
.build());
}
}
configuration:
imageId:
type: dynamic
resources:
instance1:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${imageId}
flavorId: s2.large.4
keyPair: my_key_pair_name
securityGroups:
- default
userData: |-
#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com
networks:
- name: my_network
user_data
can come from a variety of sources: inline, read in from the file
function, or the template_cloudinit_config
resource.
Notes
Multiple Ephemeral Disks
It’s possible to specify multiple block_device
entries to create an instance with multiple ephemeral (local) disks. In
order to create multiple ephemeral disks, the sum of the total amount of ephemeral space must be less than or equal to
what the chosen flavor supports.
The following example shows how to create an instance with multiple ephemeral disks:
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const foo = new opentelekomcloud.ComputeInstanceV2("foo", {blockDevices: [
{
bootIndex: 0,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "image",
uuid: _var.image_id,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "blank",
volumeSize: 1,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "blank",
volumeSize: 1,
},
]});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
foo = opentelekomcloud.ComputeInstanceV2("foo", block_devices=[
{
"boot_index": 0,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "image",
"uuid": var["image_id"],
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "blank",
"volume_size": 1,
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "blank",
"volume_size": 1,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "foo", &opentelekomcloud.ComputeInstanceV2Args{
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("image"),
Uuid: pulumi.Any(_var.Image_id),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Opentelekomcloud.ComputeInstanceV2("foo", new()
{
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 0,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "image",
Uuid = @var.Image_id,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "blank",
VolumeSize = 1,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "blank",
VolumeSize = 1,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new ComputeInstanceV2("foo", ComputeInstanceV2Args.builder()
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(0)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("image")
.uuid(var_.image_id())
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("blank")
.volumeSize(1)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("blank")
.volumeSize(1)
.build())
.build());
}
}
resources:
foo:
type: opentelekomcloud:ComputeInstanceV2
properties:
blockDevices:
- bootIndex: 0
deleteOnTermination: true
destinationType: volume
sourceType: image
uuid: ${var.image_id}
- bootIndex: -1
deleteOnTermination: true
destinationType: volume
sourceType: blank
volumeSize: 1
- bootIndex: -1
deleteOnTermination: true
destinationType: volume
sourceType: blank
volumeSize: 1
Importing basic instance
Assume you want to import an instance with one ephemeral root disk, and one network interface.
Your configuration would look like the following:
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const basicInstance = new opentelekomcloud.ComputeInstanceV2("basicInstance", {
flavorId: _var.flavor_id,
keyPair: _var.key_pair,
imageId: _var.image_id,
networks: [{
name: _var.network_name,
}],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
basic_instance = opentelekomcloud.ComputeInstanceV2("basicInstance",
flavor_id=var["flavor_id"],
key_pair=var["key_pair"],
image_id=var["image_id"],
networks=[{
"name": var["network_name"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "basicInstance", &opentelekomcloud.ComputeInstanceV2Args{
FlavorId: pulumi.Any(_var.Flavor_id),
KeyPair: pulumi.Any(_var.Key_pair),
ImageId: pulumi.Any(_var.Image_id),
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.Any(_var.Network_name),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var basicInstance = new Opentelekomcloud.ComputeInstanceV2("basicInstance", new()
{
FlavorId = @var.Flavor_id,
KeyPair = @var.Key_pair,
ImageId = @var.Image_id,
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = @var.Network_name,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var basicInstance = new ComputeInstanceV2("basicInstance", ComputeInstanceV2Args.builder()
.flavorId(var_.flavor_id())
.keyPair(var_.key_pair())
.imageId(var_.image_id())
.networks(ComputeInstanceV2NetworkArgs.builder()
.name(var_.network_name())
.build())
.build());
}
}
resources:
basicInstance:
type: opentelekomcloud:ComputeInstanceV2
properties:
flavorId: ${var.flavor_id}
keyPair: ${var.key_pair}
imageId: ${var.image_id}
networks:
- name: ${var.network_name}
Then you execute
terraform import opentelekomcloud_compute_instance_v2.basic_instance <instance_id>
Importing instance with multiple network interfaces.
Nova returns the network interfaces grouped by network, thus not in creation order. That means that if you have multiple network interfaces you must take care of the order of networks in your configuration.
As example, we want to import an instance with one ephemeral root disk, and 3 network interfaces.
Examples
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const boot_from_volume = new opentelekomcloud.ComputeInstanceV2("boot-from-volume", {
flavorId: _var.flavor_id,
keyPair: _var.key_pair,
imageId: _var.image_id,
networks: [
{
name: _var.network_1_name,
},
{
name: _var.network_2_name,
},
{
name: _var.network_1_name,
fixedIpV4: _var.fixed_ip_v4,
},
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
boot_from_volume = opentelekomcloud.ComputeInstanceV2("boot-from-volume",
flavor_id=var["flavor_id"],
key_pair=var["key_pair"],
image_id=var["image_id"],
networks=[
{
"name": var["network_1_name"],
},
{
"name": var["network_2_name"],
},
{
"name": var["network_1_name"],
"fixed_ip_v4": var["fixed_ip_v4"],
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.NewComputeInstanceV2(ctx, "boot-from-volume", &opentelekomcloud.ComputeInstanceV2Args{
FlavorId: pulumi.Any(_var.Flavor_id),
KeyPair: pulumi.Any(_var.Key_pair),
ImageId: pulumi.Any(_var.Image_id),
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.Any(_var.Network_1_name),
},
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.Any(_var.Network_2_name),
},
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.Any(_var.Network_1_name),
FixedIpV4: pulumi.Any(_var.Fixed_ip_v4),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var boot_from_volume = new Opentelekomcloud.ComputeInstanceV2("boot-from-volume", new()
{
FlavorId = @var.Flavor_id,
KeyPair = @var.Key_pair,
ImageId = @var.Image_id,
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = @var.Network_1_name,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = @var.Network_2_name,
},
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = @var.Network_1_name,
FixedIpV4 = @var.Fixed_ip_v4,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
.flavorId(var_.flavor_id())
.keyPair(var_.key_pair())
.imageId(var_.image_id())
.networks(
ComputeInstanceV2NetworkArgs.builder()
.name(var_.network_1_name())
.build(),
ComputeInstanceV2NetworkArgs.builder()
.name(var_.network_2_name())
.build(),
ComputeInstanceV2NetworkArgs.builder()
.name(var_.network_1_name())
.fixedIpV4(var_.fixed_ip_v4())
.build())
.build());
}
}
resources:
boot-from-volume:
type: opentelekomcloud:ComputeInstanceV2
properties:
flavorId: ${var.flavor_id}
keyPair: ${var.key_pair}
imageId: ${var.image_id}
networks:
- name: ${var.network_1_name}
- name: ${var.network_2_name}
- name: ${var.network_1_name}
fixedIpV4: ${var.fixed_ip_v4}
In the above configuration the networks are out of order compared to what nova and thus the import code returns, which means the plan will not be empty after import.
So either with care check the plan and modify configuration, or read the network order in the state file after import and modify your configuration accordingly.
- A note on ports. If you have created a neutron port independent of an instance, then the import code has no way to detect that the port is created idenpendently, and therefore on deletion of imported instances you might have port resources in your project, which you expected to be created by the instance and thus to also be deleted with the instance.
Importing instances with multiple block storage volumes.
We have an instance with two block storage volumes, one bootable and one non-bootable. Note that we only configure the
bootable device as block_device. The other volumes can be specified as opentelekomcloud.BlockstorageVolumeV2
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const instance2 = new opentelekomcloud.ComputeInstanceV2("instance2", {
imageId: _var.image_id,
flavorId: _var.flavor_id,
keyPair: _var.key_pair,
blockDevices: [{
uuid: _var.image_id,
sourceType: "image",
destinationType: "volume",
bootIndex: 0,
deleteOnTermination: true,
}],
networks: [{
name: _var.network_name,
}],
});
const volume1 = new opentelekomcloud.BlockstorageVolumeV2("volume1", {size: 1});
const va1 = new opentelekomcloud.ComputeVolumeAttachV2("va1", {
volumeId: volume1.blockstorageVolumeV2Id,
instanceId: instance2.computeInstanceV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
instance2 = opentelekomcloud.ComputeInstanceV2("instance2",
image_id=var["image_id"],
flavor_id=var["flavor_id"],
key_pair=var["key_pair"],
block_devices=[{
"uuid": var["image_id"],
"source_type": "image",
"destination_type": "volume",
"boot_index": 0,
"delete_on_termination": True,
}],
networks=[{
"name": var["network_name"],
}])
volume1 = opentelekomcloud.BlockstorageVolumeV2("volume1", size=1)
va1 = opentelekomcloud.ComputeVolumeAttachV2("va1",
volume_id=volume1.blockstorage_volume_v2_id,
instance_id=instance2.compute_instance_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
instance2, err := opentelekomcloud.NewComputeInstanceV2(ctx, "instance2", &opentelekomcloud.ComputeInstanceV2Args{
ImageId: pulumi.Any(_var.Image_id),
FlavorId: pulumi.Any(_var.Flavor_id),
KeyPair: pulumi.Any(_var.Key_pair),
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.Any(_var.Image_id),
SourceType: pulumi.String("image"),
DestinationType: pulumi.String("volume"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
},
},
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
Name: pulumi.Any(_var.Network_name),
},
},
})
if err != nil {
return err
}
volume1, err := opentelekomcloud.NewBlockstorageVolumeV2(ctx, "volume1", &opentelekomcloud.BlockstorageVolumeV2Args{
Size: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewComputeVolumeAttachV2(ctx, "va1", &opentelekomcloud.ComputeVolumeAttachV2Args{
VolumeId: volume1.BlockstorageVolumeV2Id,
InstanceId: instance2.ComputeInstanceV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var instance2 = new Opentelekomcloud.ComputeInstanceV2("instance2", new()
{
ImageId = @var.Image_id,
FlavorId = @var.Flavor_id,
KeyPair = @var.Key_pair,
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = @var.Image_id,
SourceType = "image",
DestinationType = "volume",
BootIndex = 0,
DeleteOnTermination = true,
},
},
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
Name = @var.Network_name,
},
},
});
var volume1 = new Opentelekomcloud.BlockstorageVolumeV2("volume1", new()
{
Size = 1,
});
var va1 = new Opentelekomcloud.ComputeVolumeAttachV2("va1", new()
{
VolumeId = volume1.BlockstorageVolumeV2Id,
InstanceId = instance2.ComputeInstanceV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ComputeInstanceV2;
import com.pulumi.opentelekomcloud.ComputeInstanceV2Args;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2BlockDeviceArgs;
import com.pulumi.opentelekomcloud.inputs.ComputeInstanceV2NetworkArgs;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2;
import com.pulumi.opentelekomcloud.BlockstorageVolumeV2Args;
import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2;
import com.pulumi.opentelekomcloud.ComputeVolumeAttachV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var instance2 = new ComputeInstanceV2("instance2", ComputeInstanceV2Args.builder()
.imageId(var_.image_id())
.flavorId(var_.flavor_id())
.keyPair(var_.key_pair())
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(var_.image_id())
.sourceType("image")
.destinationType("volume")
.bootIndex(0)
.deleteOnTermination(true)
.build())
.networks(ComputeInstanceV2NetworkArgs.builder()
.name(var_.network_name())
.build())
.build());
var volume1 = new BlockstorageVolumeV2("volume1", BlockstorageVolumeV2Args.builder()
.size(1)
.build());
var va1 = new ComputeVolumeAttachV2("va1", ComputeVolumeAttachV2Args.builder()
.volumeId(volume1.blockstorageVolumeV2Id())
.instanceId(instance2.computeInstanceV2Id())
.build());
}
}
resources:
instance2:
type: opentelekomcloud:ComputeInstanceV2
properties:
imageId: ${var.image_id}
flavorId: ${var.flavor_id}
keyPair: ${var.key_pair}
blockDevices:
- uuid: ${var.image_id}
sourceType: image
destinationType: volume
bootIndex: 0
deleteOnTermination: true
networks:
- name: ${var.network_name}
volume1:
type: opentelekomcloud:BlockstorageVolumeV2
properties:
size: 1
va1:
type: opentelekomcloud:ComputeVolumeAttachV2
properties:
volumeId: ${volume1.blockstorageVolumeV2Id}
instanceId: ${instance2.computeInstanceV2Id}
To import the instance outlined in the above configuration do the following:
terraform import opentelekomcloud_compute_instance_v2.instance_2 <instance_id>
import opentelekomcloud_blockstorage_volume_v2.volume_1 <volume_id>
terraform import opentelekomcloud_compute_volume_attach_v2.va_1
<instance_id>/<volume_id>
- A note on block storage volumes, the importer does not read delete_on_termination flag, and always assumes true. If you import an instance created with delete_on_termination false, you end up with “orphaned” volumes after destruction of instances.
Create ComputeInstanceV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComputeInstanceV2(name: string, args?: ComputeInstanceV2Args, opts?: CustomResourceOptions);
@overload
def ComputeInstanceV2(resource_name: str,
args: Optional[ComputeInstanceV2Args] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ComputeInstanceV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_ip_v4: Optional[str] = None,
access_ip_v6: Optional[str] = None,
admin_pass: Optional[str] = None,
auto_recovery: Optional[bool] = None,
availability_zone: Optional[str] = None,
block_devices: Optional[Sequence[ComputeInstanceV2BlockDeviceArgs]] = None,
compute_instance_v2_id: Optional[str] = None,
config_drive: Optional[bool] = None,
description: Optional[str] = None,
flavor_id: Optional[str] = None,
flavor_name: Optional[str] = None,
image_id: Optional[str] = None,
image_name: Optional[str] = None,
key_pair: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
networks: Optional[Sequence[ComputeInstanceV2NetworkArgs]] = None,
power_state: Optional[str] = None,
region: Optional[str] = None,
scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
security_groups: Optional[Sequence[str]] = None,
ssh_private_key_path: Optional[str] = None,
stop_before_destroy: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[ComputeInstanceV2TimeoutsArgs] = None,
user_data: Optional[str] = None)
func NewComputeInstanceV2(ctx *Context, name string, args *ComputeInstanceV2Args, opts ...ResourceOption) (*ComputeInstanceV2, error)
public ComputeInstanceV2(string name, ComputeInstanceV2Args? args = null, CustomResourceOptions? opts = null)
public ComputeInstanceV2(String name, ComputeInstanceV2Args args)
public ComputeInstanceV2(String name, ComputeInstanceV2Args args, CustomResourceOptions options)
type: opentelekomcloud:ComputeInstanceV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ComputeInstanceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ComputeInstanceV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ComputeInstanceV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComputeInstanceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComputeInstanceV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var computeInstanceV2Resource = new Opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource", new()
{
AccessIpV4 = "string",
AccessIpV6 = "string",
AdminPass = "string",
AutoRecovery = false,
AvailabilityZone = "string",
BlockDevices = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2BlockDeviceArgs
{
SourceType = "string",
BootIndex = 0,
DeleteOnTermination = false,
DestinationType = "string",
DeviceName = "string",
GuestFormat = "string",
Uuid = "string",
VolumeSize = 0,
VolumeType = "string",
},
},
ComputeInstanceV2Id = "string",
ConfigDrive = false,
Description = "string",
FlavorId = "string",
FlavorName = "string",
ImageId = "string",
ImageName = "string",
KeyPair = "string",
Metadata =
{
{ "string", "string" },
},
Name = "string",
Networks = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2NetworkArgs
{
AccessNetwork = false,
FixedIpV4 = "string",
FixedIpV6 = "string",
Mac = "string",
Name = "string",
Port = "string",
Uuid = "string",
},
},
PowerState = "string",
Region = "string",
SchedulerHints = new[]
{
new Opentelekomcloud.Inputs.ComputeInstanceV2SchedulerHintArgs
{
BuildNearHostIp = "string",
DehId = "string",
DifferentHosts = new[]
{
"string",
},
Group = "string",
Queries = new[]
{
"string",
},
SameHosts = new[]
{
"string",
},
TargetCell = "string",
Tenancy = "string",
},
},
SecurityGroups = new[]
{
"string",
},
SshPrivateKeyPath = "string",
StopBeforeDestroy = false,
Tags =
{
{ "string", "string" },
},
Timeouts = new Opentelekomcloud.Inputs.ComputeInstanceV2TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
UserData = "string",
});
example, err := opentelekomcloud.NewComputeInstanceV2(ctx, "computeInstanceV2Resource", &opentelekomcloud.ComputeInstanceV2Args{
AccessIpV4: pulumi.String("string"),
AccessIpV6: pulumi.String("string"),
AdminPass: pulumi.String("string"),
AutoRecovery: pulumi.Bool(false),
AvailabilityZone: pulumi.String("string"),
BlockDevices: opentelekomcloud.ComputeInstanceV2BlockDeviceArray{
&opentelekomcloud.ComputeInstanceV2BlockDeviceArgs{
SourceType: pulumi.String("string"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(false),
DestinationType: pulumi.String("string"),
DeviceName: pulumi.String("string"),
GuestFormat: pulumi.String("string"),
Uuid: pulumi.String("string"),
VolumeSize: pulumi.Float64(0),
VolumeType: pulumi.String("string"),
},
},
ComputeInstanceV2Id: pulumi.String("string"),
ConfigDrive: pulumi.Bool(false),
Description: pulumi.String("string"),
FlavorId: pulumi.String("string"),
FlavorName: pulumi.String("string"),
ImageId: pulumi.String("string"),
ImageName: pulumi.String("string"),
KeyPair: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Networks: opentelekomcloud.ComputeInstanceV2NetworkArray{
&opentelekomcloud.ComputeInstanceV2NetworkArgs{
AccessNetwork: pulumi.Bool(false),
FixedIpV4: pulumi.String("string"),
FixedIpV6: pulumi.String("string"),
Mac: pulumi.String("string"),
Name: pulumi.String("string"),
Port: pulumi.String("string"),
Uuid: pulumi.String("string"),
},
},
PowerState: pulumi.String("string"),
Region: pulumi.String("string"),
SchedulerHints: opentelekomcloud.ComputeInstanceV2SchedulerHintArray{
&opentelekomcloud.ComputeInstanceV2SchedulerHintArgs{
BuildNearHostIp: pulumi.String("string"),
DehId: pulumi.String("string"),
DifferentHosts: pulumi.StringArray{
pulumi.String("string"),
},
Group: pulumi.String("string"),
Queries: pulumi.StringArray{
pulumi.String("string"),
},
SameHosts: pulumi.StringArray{
pulumi.String("string"),
},
TargetCell: pulumi.String("string"),
Tenancy: pulumi.String("string"),
},
},
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SshPrivateKeyPath: pulumi.String("string"),
StopBeforeDestroy: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &opentelekomcloud.ComputeInstanceV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
UserData: pulumi.String("string"),
})
var computeInstanceV2Resource = new ComputeInstanceV2("computeInstanceV2Resource", ComputeInstanceV2Args.builder()
.accessIpV4("string")
.accessIpV6("string")
.adminPass("string")
.autoRecovery(false)
.availabilityZone("string")
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.sourceType("string")
.bootIndex(0)
.deleteOnTermination(false)
.destinationType("string")
.deviceName("string")
.guestFormat("string")
.uuid("string")
.volumeSize(0)
.volumeType("string")
.build())
.computeInstanceV2Id("string")
.configDrive(false)
.description("string")
.flavorId("string")
.flavorName("string")
.imageId("string")
.imageName("string")
.keyPair("string")
.metadata(Map.of("string", "string"))
.name("string")
.networks(ComputeInstanceV2NetworkArgs.builder()
.accessNetwork(false)
.fixedIpV4("string")
.fixedIpV6("string")
.mac("string")
.name("string")
.port("string")
.uuid("string")
.build())
.powerState("string")
.region("string")
.schedulerHints(ComputeInstanceV2SchedulerHintArgs.builder()
.buildNearHostIp("string")
.dehId("string")
.differentHosts("string")
.group("string")
.queries("string")
.sameHosts("string")
.targetCell("string")
.tenancy("string")
.build())
.securityGroups("string")
.sshPrivateKeyPath("string")
.stopBeforeDestroy(false)
.tags(Map.of("string", "string"))
.timeouts(ComputeInstanceV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.userData("string")
.build());
compute_instance_v2_resource = opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource",
access_ip_v4="string",
access_ip_v6="string",
admin_pass="string",
auto_recovery=False,
availability_zone="string",
block_devices=[{
"source_type": "string",
"boot_index": 0,
"delete_on_termination": False,
"destination_type": "string",
"device_name": "string",
"guest_format": "string",
"uuid": "string",
"volume_size": 0,
"volume_type": "string",
}],
compute_instance_v2_id="string",
config_drive=False,
description="string",
flavor_id="string",
flavor_name="string",
image_id="string",
image_name="string",
key_pair="string",
metadata={
"string": "string",
},
name="string",
networks=[{
"access_network": False,
"fixed_ip_v4": "string",
"fixed_ip_v6": "string",
"mac": "string",
"name": "string",
"port": "string",
"uuid": "string",
}],
power_state="string",
region="string",
scheduler_hints=[{
"build_near_host_ip": "string",
"deh_id": "string",
"different_hosts": ["string"],
"group": "string",
"queries": ["string"],
"same_hosts": ["string"],
"target_cell": "string",
"tenancy": "string",
}],
security_groups=["string"],
ssh_private_key_path="string",
stop_before_destroy=False,
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
user_data="string")
const computeInstanceV2Resource = new opentelekomcloud.ComputeInstanceV2("computeInstanceV2Resource", {
accessIpV4: "string",
accessIpV6: "string",
adminPass: "string",
autoRecovery: false,
availabilityZone: "string",
blockDevices: [{
sourceType: "string",
bootIndex: 0,
deleteOnTermination: false,
destinationType: "string",
deviceName: "string",
guestFormat: "string",
uuid: "string",
volumeSize: 0,
volumeType: "string",
}],
computeInstanceV2Id: "string",
configDrive: false,
description: "string",
flavorId: "string",
flavorName: "string",
imageId: "string",
imageName: "string",
keyPair: "string",
metadata: {
string: "string",
},
name: "string",
networks: [{
accessNetwork: false,
fixedIpV4: "string",
fixedIpV6: "string",
mac: "string",
name: "string",
port: "string",
uuid: "string",
}],
powerState: "string",
region: "string",
schedulerHints: [{
buildNearHostIp: "string",
dehId: "string",
differentHosts: ["string"],
group: "string",
queries: ["string"],
sameHosts: ["string"],
targetCell: "string",
tenancy: "string",
}],
securityGroups: ["string"],
sshPrivateKeyPath: "string",
stopBeforeDestroy: false,
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
userData: "string",
});
type: opentelekomcloud:ComputeInstanceV2
properties:
accessIpV4: string
accessIpV6: string
adminPass: string
autoRecovery: false
availabilityZone: string
blockDevices:
- bootIndex: 0
deleteOnTermination: false
destinationType: string
deviceName: string
guestFormat: string
sourceType: string
uuid: string
volumeSize: 0
volumeType: string
computeInstanceV2Id: string
configDrive: false
description: string
flavorId: string
flavorName: string
imageId: string
imageName: string
keyPair: string
metadata:
string: string
name: string
networks:
- accessNetwork: false
fixedIpV4: string
fixedIpV6: string
mac: string
name: string
port: string
uuid: string
powerState: string
region: string
schedulerHints:
- buildNearHostIp: string
dehId: string
differentHosts:
- string
group: string
queries:
- string
sameHosts:
- string
targetCell: string
tenancy: string
securityGroups:
- string
sshPrivateKeyPath: string
stopBeforeDestroy: false
tags:
string: string
timeouts:
create: string
delete: string
update: string
userData: string
ComputeInstanceV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ComputeInstanceV2 resource accepts the following input properties:
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- Admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- Auto
Recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- Availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- Block
Devices List<ComputeInstance V2Block Device> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- Compute
Instance stringV2Id - Config
Drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- Description string
- Server description.
- Flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- Flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- Image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - Image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - Key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- Metadata Dictionary<string, string>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- Name string
- A unique name for the resource.
- Networks
List<Compute
Instance V2Network> - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- Power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- Region string
- Scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- Security
Groups List<string> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- Stop
Before boolDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Dictionary<string, string>
- Tags key/value pairs to associate with the instance.
- Timeouts
Compute
Instance V2Timeouts - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- Admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- Auto
Recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- Availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- Block
Devices []ComputeInstance V2Block Device Args - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- Compute
Instance stringV2Id - Config
Drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- Description string
- Server description.
- Flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- Flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- Image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - Image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - Key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- Metadata map[string]string
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- Name string
- A unique name for the resource.
- Networks
[]Compute
Instance V2Network Args - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- Power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- Region string
- Scheduler
Hints []ComputeInstance V2Scheduler Hint Args - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- Security
Groups []string An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- Stop
Before boolDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- map[string]string
- Tags key/value pairs to associate with the instance.
- Timeouts
Compute
Instance V2Timeouts Args - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- admin
Pass String - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- auto
Recovery Boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone String - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices List<ComputeInstance V2Block Device> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance StringV2Id - config
Drive Boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description String
- Server description.
- flavor
Id String - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name String - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id String - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name String - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair String - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Map<String,String>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name String
- A unique name for the resource.
- networks
List<Compute
Instance V2Network> - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- power
State String Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region String
- scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups List<String> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private StringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before BooleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Map<String,String>
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts - user
Data String - The user data to provide when launching the instance. Changing this creates a new server.
- access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip stringV6 - The first detected Fixed IPv6 address.
- admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- auto
Recovery boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices ComputeInstance V2Block Device[] - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance stringV2Id - config
Drive boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description string
- Server description.
- flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata {[key: string]: string}
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name string
- A unique name for the resource.
- networks
Compute
Instance V2Network[] - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region string
- scheduler
Hints ComputeInstance V2Scheduler Hint[] - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups string[] An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before booleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- {[key: string]: string}
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts - user
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- access_
ip_ strv4 - The first detected Fixed IPv4 address or the Floating IP.
- access_
ip_ strv6 - The first detected Fixed IPv6 address.
- admin_
pass str - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- auto_
recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability_
zone str - The availability zone in which to create the server. Changing this creates a new server.
- block_
devices Sequence[ComputeInstance V2Block Device Args] - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute_
instance_ strv2_ id - config_
drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description str
- Server description.
- flavor_
id str - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor_
name str - The name of the desired flavor for the server. Changing this resizes the existing server.
- image_
id str - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image_
name str - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key_
pair str - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Mapping[str, str]
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name str
- A unique name for the resource.
- networks
Sequence[Compute
Instance V2Network Args] - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- power_
state str Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region str
- scheduler_
hints Sequence[ComputeInstance V2Scheduler Hint Args] - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security_
groups Sequence[str] An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh_
private_ strkey_ path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop_
before_ booldestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Mapping[str, str]
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts Args - user_
data str - The user data to provide when launching the instance. Changing this creates a new server.
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- admin
Pass String - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- auto
Recovery Boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone String - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices List<Property Map> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance StringV2Id - config
Drive Boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description String
- Server description.
- flavor
Id String - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name String - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id String - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name String - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair String - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Map<String>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name String
- A unique name for the resource.
- networks List<Property Map>
- An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- power
State String Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region String
- scheduler
Hints List<Property Map> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups List<String> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private StringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before BooleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Map<String>
- Tags key/value pairs to associate with the instance.
- timeouts Property Map
- user
Data String - The user data to provide when launching the instance. Changing this creates a new server.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComputeInstanceV2 resource produces the following output properties:
- All
Metadata Dictionary<string, string> - Encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- Volume
Attacheds List<ComputeInstance V2Volume Attached>
- All
Metadata map[string]string - Encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- Volume
Attacheds []ComputeInstance V2Volume Attached
- all
Metadata Map<String,String> - encrypted
Password String - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- volume
Attacheds List<ComputeInstance V2Volume Attached>
- all
Metadata {[key: string]: string} - encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- id string
- The provider-assigned unique ID for this managed resource.
- password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- volume
Attacheds ComputeInstance V2Volume Attached[]
- all_
metadata Mapping[str, str] - encrypted_
password str - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- id str
- The provider-assigned unique ID for this managed resource.
- password str
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- volume_
attacheds Sequence[ComputeInstance V2Volume Attached]
- all
Metadata Map<String> - encrypted
Password String - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- volume
Attacheds List<Property Map>
Look up Existing ComputeInstanceV2 Resource
Get an existing ComputeInstanceV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ComputeInstanceV2State, opts?: CustomResourceOptions): ComputeInstanceV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_ip_v4: Optional[str] = None,
access_ip_v6: Optional[str] = None,
admin_pass: Optional[str] = None,
all_metadata: Optional[Mapping[str, str]] = None,
auto_recovery: Optional[bool] = None,
availability_zone: Optional[str] = None,
block_devices: Optional[Sequence[ComputeInstanceV2BlockDeviceArgs]] = None,
compute_instance_v2_id: Optional[str] = None,
config_drive: Optional[bool] = None,
description: Optional[str] = None,
encrypted_password: Optional[str] = None,
flavor_id: Optional[str] = None,
flavor_name: Optional[str] = None,
image_id: Optional[str] = None,
image_name: Optional[str] = None,
key_pair: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
networks: Optional[Sequence[ComputeInstanceV2NetworkArgs]] = None,
password: Optional[str] = None,
power_state: Optional[str] = None,
region: Optional[str] = None,
scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
security_groups: Optional[Sequence[str]] = None,
ssh_private_key_path: Optional[str] = None,
stop_before_destroy: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[ComputeInstanceV2TimeoutsArgs] = None,
user_data: Optional[str] = None,
volume_attacheds: Optional[Sequence[ComputeInstanceV2VolumeAttachedArgs]] = None) -> ComputeInstanceV2
func GetComputeInstanceV2(ctx *Context, name string, id IDInput, state *ComputeInstanceV2State, opts ...ResourceOption) (*ComputeInstanceV2, error)
public static ComputeInstanceV2 Get(string name, Input<string> id, ComputeInstanceV2State? state, CustomResourceOptions? opts = null)
public static ComputeInstanceV2 get(String name, Output<String> id, ComputeInstanceV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:ComputeInstanceV2 get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- Admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- All
Metadata Dictionary<string, string> - Auto
Recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- Availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- Block
Devices List<ComputeInstance V2Block Device> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- Compute
Instance stringV2Id - Config
Drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- Description string
- Server description.
- Encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- Flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- Flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- Image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - Image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - Key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- Metadata Dictionary<string, string>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- Name string
- A unique name for the resource.
- Networks
List<Compute
Instance V2Network> - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- Password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- Power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- Region string
- Scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- Security
Groups List<string> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- Stop
Before boolDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Dictionary<string, string>
- Tags key/value pairs to associate with the instance.
- Timeouts
Compute
Instance V2Timeouts - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- Volume
Attacheds List<ComputeInstance V2Volume Attached>
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- Admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- All
Metadata map[string]string - Auto
Recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- Availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- Block
Devices []ComputeInstance V2Block Device Args - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- Compute
Instance stringV2Id - Config
Drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- Description string
- Server description.
- Encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- Flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- Flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- Image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - Image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - Key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- Metadata map[string]string
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- Name string
- A unique name for the resource.
- Networks
[]Compute
Instance V2Network Args - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- Password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- Power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- Region string
- Scheduler
Hints []ComputeInstance V2Scheduler Hint Args - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- Security
Groups []string An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- Stop
Before boolDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- map[string]string
- Tags key/value pairs to associate with the instance.
- Timeouts
Compute
Instance V2Timeouts Args - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- Volume
Attacheds []ComputeInstance V2Volume Attached Args
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- admin
Pass String - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- all
Metadata Map<String,String> - auto
Recovery Boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone String - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices List<ComputeInstance V2Block Device> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance StringV2Id - config
Drive Boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description String
- Server description.
- encrypted
Password String - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- flavor
Id String - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name String - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id String - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name String - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair String - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Map<String,String>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name String
- A unique name for the resource.
- networks
List<Compute
Instance V2Network> - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- password String
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- power
State String Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region String
- scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups List<String> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private StringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before BooleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Map<String,String>
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts - user
Data String - The user data to provide when launching the instance. Changing this creates a new server.
- volume
Attacheds List<ComputeInstance V2Volume Attached>
- access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip stringV6 - The first detected Fixed IPv6 address.
- admin
Pass string - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- all
Metadata {[key: string]: string} - auto
Recovery boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone string - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices ComputeInstance V2Block Device[] - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance stringV2Id - config
Drive boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description string
- Server description.
- encrypted
Password string - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- flavor
Id string - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name string - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id string - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name string - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair string - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata {[key: string]: string}
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name string
- A unique name for the resource.
- networks
Compute
Instance V2Network[] - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- password string
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- power
State string Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region string
- scheduler
Hints ComputeInstance V2Scheduler Hint[] - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups string[] An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private stringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before booleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- {[key: string]: string}
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts - user
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- volume
Attacheds ComputeInstance V2Volume Attached[]
- access_
ip_ strv4 - The first detected Fixed IPv4 address or the Floating IP.
- access_
ip_ strv6 - The first detected Fixed IPv6 address.
- admin_
pass str - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- all_
metadata Mapping[str, str] - auto_
recovery bool - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability_
zone str - The availability zone in which to create the server. Changing this creates a new server.
- block_
devices Sequence[ComputeInstance V2Block Device Args] - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute_
instance_ strv2_ id - config_
drive bool - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description str
- Server description.
- encrypted_
password str - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- flavor_
id str - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor_
name str - The name of the desired flavor for the server. Changing this resizes the existing server.
- image_
id str - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image_
name str - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key_
pair str - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Mapping[str, str]
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name str
- A unique name for the resource.
- networks
Sequence[Compute
Instance V2Network Args] - An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- password str
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- power_
state str Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region str
- scheduler_
hints Sequence[ComputeInstance V2Scheduler Hint Args] - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security_
groups Sequence[str] An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh_
private_ strkey_ path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop_
before_ booldestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Mapping[str, str]
- Tags key/value pairs to associate with the instance.
- timeouts
Compute
Instance V2Timeouts Args - user_
data str - The user data to provide when launching the instance. Changing this creates a new server.
- volume_
attacheds Sequence[ComputeInstance V2Volume Attached Args]
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- admin
Pass String - The administrative password to assign to the server. Changing this changes the root password on the existing server.
- all
Metadata Map<String> - auto
Recovery Boolean - Configures or deletes automatic recovery of an instance. Defaults to true.
- availability
Zone String - The availability zone in which to create the server. Changing this creates a new server.
- block
Devices List<Property Map> - Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.
- compute
Instance StringV2Id - config
Drive Boolean - Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
- description String
- Server description.
- encrypted
Password String - The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
- flavor
Id String - The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
- flavor
Name String - The name of the desired flavor for the server. Changing this resizes the existing server.
- image
Id String - (Optional; Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server. - image
Name String - (Optional; Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server. - key
Pair String - The name of a key pair to put on the server. The key pair must already be created and associated with the tenant's account. Changing this creates a new server.
- metadata Map<String>
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
- name String
- A unique name for the resource.
- networks List<Property Map>
- An array of one or more networks to attach to the instance. Required when there are multiple networks defined for the tenant. The network object structure is documented below. Changing this creates a new server.
- password String
- The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
- power
State String Provide the VM state. Only
active
andshutoff
are supported values.-> If the initial
power_state
is theshutoff
the VM will be stopped immediately after build, and the provisioners like remote-exec or files are not supported.- region String
- scheduler
Hints List<Property Map> - Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
- security
Groups List<String> An array of one or more security group names to associate with the server. Changing this results in adding/removing security groups from the existing server.
Warning Names should be used and not IDs. Security group names should be unique, otherwise it will return an error.
When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- ssh
Private StringKey Path - The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
- stop
Before BooleanDestroy - Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn't stop within a timeout, it will be destroyed anyway.
- Map<String>
- Tags key/value pairs to associate with the instance.
- timeouts Property Map
- user
Data String - The user data to provide when launching the instance. Changing this creates a new server.
- volume
Attacheds List<Property Map>
Supporting Types
ComputeInstanceV2BlockDevice, ComputeInstanceV2BlockDeviceArgs
- Source
Type string - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- Boot
Index double - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- Delete
On boolTermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- Destination
Type string - The type that gets created. Currently only support "volume". Changing this creates a new server.
- Device
Name string - Guest
Format string - Uuid string
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- Volume
Size double - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- Volume
Type string Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
- Source
Type string - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- Boot
Index float64 - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- Delete
On boolTermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- Destination
Type string - The type that gets created. Currently only support "volume". Changing this creates a new server.
- Device
Name string - Guest
Format string - Uuid string
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- Volume
Size float64 - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- Volume
Type string Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
- source
Type String - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- boot
Index Double - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- delete
On BooleanTermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- destination
Type String - The type that gets created. Currently only support "volume". Changing this creates a new server.
- device
Name String - guest
Format String - uuid String
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- volume
Size Double - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- volume
Type String Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
- source
Type string - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- boot
Index number - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- delete
On booleanTermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- destination
Type string - The type that gets created. Currently only support "volume". Changing this creates a new server.
- device
Name string - guest
Format string - uuid string
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- volume
Size number - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- volume
Type string Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
- source_
type str - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- boot_
index float - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- delete_
on_ booltermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- destination_
type str - The type that gets created. Currently only support "volume". Changing this creates a new server.
- device_
name str - guest_
format str - uuid str
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- volume_
size float - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- volume_
type str Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
- source
Type String - The source type of the device. Must be one of "blank", "image", "volume", or "snapshot". Changing this creates a new server.
- boot
Index Number - The boot index of the volume. It defaults to 0. Changing this creates a new server.
- delete
On BooleanTermination - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.
- destination
Type String - The type that gets created. Currently only support "volume". Changing this creates a new server.
- device
Name String - guest
Format String - uuid String
- The UUID of the image, volume, or snapshot. Changing this creates a new server.
- volume
Size Number - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, and source=blank and destination=volume. Changing this creates a new server.
- volume
Type String Currently, the value can be
SSD
(ultra-I/O disk type),SAS
(high I/O disk type), orSATA
(common I/O disk type) OTC-APINOTE: Common I/O (SATA) will reach end of life, end of 2025.
ComputeInstanceV2Network, ComputeInstanceV2NetworkArgs
- Access
Network bool - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- Fixed
Ip stringV4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- Fixed
Ip stringV6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- Mac string
- Name string
- The human-readable name of the network. Changing this creates a new server.
- Port string
- The port UUID of a network to attach to the server. Changing this creates a new server.
- Uuid string
- The network UUID to attach to the server. Changing this creates a new server.
- Access
Network bool - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- Fixed
Ip stringV4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- Fixed
Ip stringV6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- Mac string
- Name string
- The human-readable name of the network. Changing this creates a new server.
- Port string
- The port UUID of a network to attach to the server. Changing this creates a new server.
- Uuid string
- The network UUID to attach to the server. Changing this creates a new server.
- access
Network Boolean - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- fixed
Ip StringV4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- fixed
Ip StringV6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- mac String
- name String
- The human-readable name of the network. Changing this creates a new server.
- port String
- The port UUID of a network to attach to the server. Changing this creates a new server.
- uuid String
- The network UUID to attach to the server. Changing this creates a new server.
- access
Network boolean - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- fixed
Ip stringV4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- fixed
Ip stringV6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- mac string
- name string
- The human-readable name of the network. Changing this creates a new server.
- port string
- The port UUID of a network to attach to the server. Changing this creates a new server.
- uuid string
- The network UUID to attach to the server. Changing this creates a new server.
- access_
network bool - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- fixed_
ip_ strv4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- fixed_
ip_ strv6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- mac str
- name str
- The human-readable name of the network. Changing this creates a new server.
- port str
- The port UUID of a network to attach to the server. Changing this creates a new server.
- uuid str
- The network UUID to attach to the server. Changing this creates a new server.
- access
Network Boolean - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
- fixed
Ip StringV4 - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.
- fixed
Ip StringV6 - Specifies a fixed IPv6 address to be used on this network. Changing this creates a new server.
- mac String
- name String
- The human-readable name of the network. Changing this creates a new server.
- port String
- The port UUID of a network to attach to the server. Changing this creates a new server.
- uuid String
- The network UUID to attach to the server. Changing this creates a new server.
ComputeInstanceV2SchedulerHint, ComputeInstanceV2SchedulerHintArgs
- Build
Near stringHost Ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- Deh
Id string - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- Different
Hosts List<string> - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- Group string
- A UUID of a Server Group. The instance will be placed into that group.
- Queries List<string>
- A conditional query that a compute node must pass in order to host an instance.
- Same
Hosts List<string> - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- Target
Cell string - The name of a cell to host the instance.
- Tenancy string
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
- Build
Near stringHost Ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- Deh
Id string - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- Different
Hosts []string - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- Group string
- A UUID of a Server Group. The instance will be placed into that group.
- Queries []string
- A conditional query that a compute node must pass in order to host an instance.
- Same
Hosts []string - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- Target
Cell string - The name of a cell to host the instance.
- Tenancy string
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
- build
Near StringHost Ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- deh
Id String - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- different
Hosts List<String> - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- group String
- A UUID of a Server Group. The instance will be placed into that group.
- queries List<String>
- A conditional query that a compute node must pass in order to host an instance.
- same
Hosts List<String> - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- target
Cell String - The name of a cell to host the instance.
- tenancy String
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
- build
Near stringHost Ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- deh
Id string - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- different
Hosts string[] - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- group string
- A UUID of a Server Group. The instance will be placed into that group.
- queries string[]
- A conditional query that a compute node must pass in order to host an instance.
- same
Hosts string[] - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- target
Cell string - The name of a cell to host the instance.
- tenancy string
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
- build_
near_ strhost_ ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- deh_
id str - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- different_
hosts Sequence[str] - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- group str
- A UUID of a Server Group. The instance will be placed into that group.
- queries Sequence[str]
- A conditional query that a compute node must pass in order to host an instance.
- same_
hosts Sequence[str] - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- target_
cell str - The name of a cell to host the instance.
- tenancy str
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
- build
Near StringHost Ip - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.
- deh
Id String - The ID of DeH. This parameter takes effect only when the value of tenancy is dedicated.
- different
Hosts List<String> - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.
- group String
- A UUID of a Server Group. The instance will be placed into that group.
- queries List<String>
- A conditional query that a compute node must pass in order to host an instance.
- same
Hosts List<String> - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.
- target
Cell String - The name of a cell to host the instance.
- tenancy String
- The tenancy specifies whether the ECS is to be created on a Dedicated Host (DeH) or in a shared pool.
ComputeInstanceV2Timeouts, ComputeInstanceV2TimeoutsArgs
ComputeInstanceV2VolumeAttached, ComputeInstanceV2VolumeAttachedArgs
- Id string
- Id string
- id String
- id string
- id str
- id String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.