flexibleengine.ComputeInstanceV2
Explore with Pulumi AI
Manages a V2 VM instance resource within FlexibleEngine.
Example Usage
Basic Instance
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const basic = new flexibleengine.ComputeInstanceV2("basic", {
imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
}],
tags: {
foo: "bar",
"this": "that",
},
});
import pulumi
import pulumi_flexibleengine as flexibleengine
basic = flexibleengine.ComputeInstanceV2("basic",
image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
flavor_id="s3.large.2",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
}],
tags={
"foo": "bar",
"this": "that",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "basic", &flexibleengine.ComputeInstanceV2Args{
ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
},
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
"this": pulumi.String("that"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var basic = new Flexibleengine.ComputeInstanceV2("basic", new()
{
ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
},
Tags =
{
{ "foo", "bar" },
{ "this", "that" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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 basic = new ComputeInstanceV2("basic", ComputeInstanceV2Args.builder()
.imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
.flavorId("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build())
.tags(Map.ofEntries(
Map.entry("foo", "bar"),
Map.entry("this", "that")
))
.build());
}
}
resources:
basic:
type: flexibleengine:ComputeInstanceV2
properties:
imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
tags:
foo: bar
this: that
Instance With Attached Volume
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const myvol = new flexibleengine.BlockstorageVolumeV2("myvol", {size: 1});
const myinstance = new flexibleengine.ComputeInstanceV2("myinstance", {
imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
}],
});
const attached = new flexibleengine.ComputeVolumeAttachV2("attached", {
instanceId: myinstance.computeInstanceV2Id,
volumeId: myvol.blockstorageVolumeV2Id,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
myvol = flexibleengine.BlockstorageVolumeV2("myvol", size=1)
myinstance = flexibleengine.ComputeInstanceV2("myinstance",
image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
flavor_id="s3.large.2",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
}])
attached = flexibleengine.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/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myvol, err := flexibleengine.NewBlockstorageVolumeV2(ctx, "myvol", &flexibleengine.BlockstorageVolumeV2Args{
Size: pulumi.Float64(1),
})
if err != nil {
return err
}
myinstance, err := flexibleengine.NewComputeInstanceV2(ctx, "myinstance", &flexibleengine.ComputeInstanceV2Args{
ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
},
})
if err != nil {
return err
}
_, err = flexibleengine.NewComputeVolumeAttachV2(ctx, "attached", &flexibleengine.ComputeVolumeAttachV2Args{
InstanceId: myinstance.ComputeInstanceV2Id,
VolumeId: myvol.BlockstorageVolumeV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var myvol = new Flexibleengine.BlockstorageVolumeV2("myvol", new()
{
Size = 1,
});
var myinstance = new Flexibleengine.ComputeInstanceV2("myinstance", new()
{
ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
},
});
var attached = new Flexibleengine.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.flexibleengine.BlockstorageVolumeV2;
import com.pulumi.flexibleengine.BlockstorageVolumeV2Args;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.inputs.ComputeInstanceV2NetworkArgs;
import com.pulumi.flexibleengine.ComputeVolumeAttachV2;
import com.pulumi.flexibleengine.ComputeVolumeAttachV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
.size(1)
.build());
var myinstance = new ComputeInstanceV2("myinstance", ComputeInstanceV2Args.builder()
.imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
.flavorId("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build())
.build());
var attached = new ComputeVolumeAttachV2("attached", ComputeVolumeAttachV2Args.builder()
.instanceId(myinstance.computeInstanceV2Id())
.volumeId(myvol.blockstorageVolumeV2Id())
.build());
}
}
resources:
myvol:
type: flexibleengine:BlockstorageVolumeV2
properties:
size: 1
myinstance:
type: flexibleengine:ComputeInstanceV2
properties:
imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
attached:
type: flexibleengine:ComputeVolumeAttachV2
properties:
instanceId: ${myinstance.computeInstanceV2Id}
volumeId: ${myvol.blockstorageVolumeV2Id}
Boot From Volume
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const boot_from_volume = new flexibleengine.ComputeInstanceV2("boot-from-volume", {
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [{
uuid: "<image-id>",
sourceType: "image",
volumeSize: 5,
bootIndex: 0,
destinationType: "volume",
deleteOnTermination: true,
volumeType: "SSD",
}],
networks: [{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
boot_from_volume = flexibleengine.ComputeInstanceV2("boot-from-volume",
flavor_id="s3.large.2",
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=[{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "boot-from-volume", &flexibleengine.ComputeInstanceV2Args{
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.String("<image-id>"),
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: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var boot_from_volume = new Flexibleengine.ComputeInstanceV2("boot-from-volume", new()
{
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = "<image-id>",
SourceType = "image",
VolumeSize = 5,
BootIndex = 0,
DestinationType = "volume",
DeleteOnTermination = true,
VolumeType = "SSD",
},
},
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.inputs.ComputeInstanceV2BlockDeviceArgs;
import com.pulumi.flexibleengine.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("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.uuid("<image-id>")
.sourceType("image")
.volumeSize(5)
.bootIndex(0)
.destinationType("volume")
.deleteOnTermination(true)
.volumeType("SSD")
.build())
.networks(ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build())
.build());
}
}
resources:
boot-from-volume:
type: flexibleengine:ComputeInstanceV2
properties:
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: <image-id>
sourceType: image
volumeSize: 5
bootIndex: 0
destinationType: volume
deleteOnTermination: true
volumeType: SSD
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
Boot From an Existing Volume
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const myvol = new flexibleengine.BlockstorageVolumeV2("myvol", {
size: 5,
imageId: "<image-id>",
});
const boot_from_volume = new flexibleengine.ComputeInstanceV2("boot-from-volume", {
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [{
uuid: myvol.blockstorageVolumeV2Id,
sourceType: "volume",
bootIndex: 0,
destinationType: "volume",
deleteOnTermination: true,
}],
networks: [{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
myvol = flexibleengine.BlockstorageVolumeV2("myvol",
size=5,
image_id="<image-id>")
boot_from_volume = flexibleengine.ComputeInstanceV2("boot-from-volume",
flavor_id="s3.large.2",
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=[{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myvol, err := flexibleengine.NewBlockstorageVolumeV2(ctx, "myvol", &flexibleengine.BlockstorageVolumeV2Args{
Size: pulumi.Float64(5),
ImageId: pulumi.String("<image-id>"),
})
if err != nil {
return err
}
_, err = flexibleengine.NewComputeInstanceV2(ctx, "boot-from-volume", &flexibleengine.ComputeInstanceV2Args{
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
Uuid: myvol.BlockstorageVolumeV2Id,
SourceType: pulumi.String("volume"),
BootIndex: pulumi.Float64(0),
DestinationType: pulumi.String("volume"),
DeleteOnTermination: pulumi.Bool(true),
},
},
Networks: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var myvol = new Flexibleengine.BlockstorageVolumeV2("myvol", new()
{
Size = 5,
ImageId = "<image-id>",
});
var boot_from_volume = new Flexibleengine.ComputeInstanceV2("boot-from-volume", new()
{
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = myvol.BlockstorageVolumeV2Id,
SourceType = "volume",
BootIndex = 0,
DestinationType = "volume",
DeleteOnTermination = true,
},
},
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.BlockstorageVolumeV2;
import com.pulumi.flexibleengine.BlockstorageVolumeV2Args;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.inputs.ComputeInstanceV2BlockDeviceArgs;
import com.pulumi.flexibleengine.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 myvol = new BlockstorageVolumeV2("myvol", BlockstorageVolumeV2Args.builder()
.size(5)
.imageId("<image-id>")
.build());
var boot_from_volume = new ComputeInstanceV2("boot-from-volume", ComputeInstanceV2Args.builder()
.flavorId("s3.large.2")
.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()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build())
.build());
}
}
resources:
myvol:
type: flexibleengine:BlockstorageVolumeV2
properties:
size: 5
imageId: <image-id>
boot-from-volume:
type: flexibleengine:ComputeInstanceV2
properties:
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: ${myvol.blockstorageVolumeV2Id}
sourceType: volume
bootIndex: 0
destinationType: volume
deleteOnTermination: true
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
Boot Instance, Create Volume, and Attach Volume as a Block Device
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const instance1 = new flexibleengine.ComputeInstanceV2("instance1", {
blockDevices: [
{
bootIndex: 0,
deleteOnTermination: true,
destinationType: "local",
sourceType: "image",
uuid: "<image-id>",
},
{
bootIndex: 1,
deleteOnTermination: true,
destinationType: "volume",
sourceType: "blank",
volumeSize: 1,
},
],
flavorId: "s3.large.2",
imageId: "<image-id>",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
instance1 = flexibleengine.ComputeInstanceV2("instance1",
block_devices=[
{
"boot_index": 0,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "image",
"uuid": "<image-id>",
},
{
"boot_index": 1,
"delete_on_termination": True,
"destination_type": "volume",
"source_type": "blank",
"volume_size": 1,
},
],
flavor_id="s3.large.2",
image_id="<image-id>",
key_pair="my_key_pair_name",
security_groups=["default"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "instance1", &flexibleengine.ComputeInstanceV2Args{
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("image"),
Uuid: pulumi.String("<image-id>"),
},
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("volume"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
},
FlavorId: pulumi.String("s3.large.2"),
ImageId: pulumi.String("<image-id>"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var instance1 = new Flexibleengine.ComputeInstanceV2("instance1", new()
{
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 0,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "image",
Uuid = "<image-id>",
},
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 1,
DeleteOnTermination = true,
DestinationType = "volume",
SourceType = "blank",
VolumeSize = 1,
},
},
FlavorId = "s3.large.2",
ImageId = "<image-id>",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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 instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(0)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("image")
.uuid("<image-id>")
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(1)
.deleteOnTermination(true)
.destinationType("volume")
.sourceType("blank")
.volumeSize(1)
.build())
.flavorId("s3.large.2")
.imageId("<image-id>")
.keyPair("my_key_pair_name")
.securityGroups("default")
.build());
}
}
resources:
instance1:
type: flexibleengine:ComputeInstanceV2
properties:
blockDevices:
- bootIndex: 0
deleteOnTermination: true
destinationType: local
sourceType: image
uuid: <image-id>
- bootIndex: 1
deleteOnTermination: true
destinationType: volume
sourceType: blank
volumeSize: 1
flavorId: s3.large.2
imageId: <image-id>
keyPair: my_key_pair_name
securityGroups:
- default
Boot Instance and Attach Existing Volume as a Block Device
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const volume1 = new flexibleengine.BlockstorageVolumeV2("volume1", {size: 1});
const instance1 = new flexibleengine.ComputeInstanceV2("instance1", {
imageId: "<image-id>",
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
blockDevices: [
{
uuid: "<image-id>",
sourceType: "image",
destinationType: "local",
bootIndex: 0,
deleteOnTermination: true,
},
{
uuid: volume1.blockstorageVolumeV2Id,
sourceType: "volume",
destinationType: "volume",
bootIndex: 1,
deleteOnTermination: true,
},
],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
volume1 = flexibleengine.BlockstorageVolumeV2("volume1", size=1)
instance1 = flexibleengine.ComputeInstanceV2("instance1",
image_id="<image-id>",
flavor_id="s3.large.2",
key_pair="my_key_pair_name",
security_groups=["default"],
block_devices=[
{
"uuid": "<image-id>",
"source_type": "image",
"destination_type": "local",
"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/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
volume1, err := flexibleengine.NewBlockstorageVolumeV2(ctx, "volume1", &flexibleengine.BlockstorageVolumeV2Args{
Size: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = flexibleengine.NewComputeInstanceV2(ctx, "instance1", &flexibleengine.ComputeInstanceV2Args{
ImageId: pulumi.String("<image-id>"),
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
Uuid: pulumi.String("<image-id>"),
SourceType: pulumi.String("image"),
DestinationType: pulumi.String("local"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
},
&flexibleengine.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 Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var volume1 = new Flexibleengine.BlockstorageVolumeV2("volume1", new()
{
Size = 1,
});
var instance1 = new Flexibleengine.ComputeInstanceV2("instance1", new()
{
ImageId = "<image-id>",
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
Uuid = "<image-id>",
SourceType = "image",
DestinationType = "local",
BootIndex = 0,
DeleteOnTermination = true,
},
new Flexibleengine.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.flexibleengine.BlockstorageVolumeV2;
import com.pulumi.flexibleengine.BlockstorageVolumeV2Args;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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 volume1 = new BlockstorageVolumeV2("volume1", BlockstorageVolumeV2Args.builder()
.size(1)
.build());
var instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.imageId("<image-id>")
.flavorId("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.uuid("<image-id>")
.sourceType("image")
.destinationType("local")
.bootIndex(0)
.deleteOnTermination(true)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.uuid(volume1.blockstorageVolumeV2Id())
.sourceType("volume")
.destinationType("volume")
.bootIndex(1)
.deleteOnTermination(true)
.build())
.build());
}
}
resources:
volume1:
type: flexibleengine:BlockstorageVolumeV2
properties:
size: 1
instance1:
type: flexibleengine:ComputeInstanceV2
properties:
imageId: <image-id>
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
blockDevices:
- uuid: <image-id>
sourceType: image
destinationType: local
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 flexibleengine from "@pulumi/flexibleengine";
const eip1 = new flexibleengine.VpcEip("eip1", {
publicip: {
type: "5_bgp",
},
bandwidth: {
name: "test",
size: 10,
shareType: "PER",
},
});
const multi_net = new flexibleengine.ComputeInstanceV2("multi-net", {
imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
networks: [
{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
},
{
uuid: flexibleengine_vpc_subnet_v1.example_subnet_2.id,
},
],
});
const myip = new flexibleengine.ComputeFloatingipAssociateV2("myip", {
floatingIp: eip1.publicip.apply(publicip => publicip.ipAddress),
instanceId: multi_net.computeInstanceV2Id,
fixedIp: multi_net.networks.apply(networks => networks?.[1]?.fixedIpV4),
});
import pulumi
import pulumi_flexibleengine as flexibleengine
eip1 = flexibleengine.VpcEip("eip1",
publicip={
"type": "5_bgp",
},
bandwidth={
"name": "test",
"size": 10,
"share_type": "PER",
})
multi_net = flexibleengine.ComputeInstanceV2("multi-net",
image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
flavor_id="s3.large.2",
key_pair="my_key_pair_name",
security_groups=["default"],
networks=[
{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
},
{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet_2"]["id"],
},
])
myip = flexibleengine.ComputeFloatingipAssociateV2("myip",
floating_ip=eip1.publicip.ip_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/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
eip1, err := flexibleengine.NewVpcEip(ctx, "eip1", &flexibleengine.VpcEipArgs{
Publicip: &flexibleengine.VpcEipPublicipArgs{
Type: pulumi.String("5_bgp"),
},
Bandwidth: &flexibleengine.VpcEipBandwidthArgs{
Name: pulumi.String("test"),
Size: pulumi.Float64(10),
ShareType: pulumi.String("PER"),
},
})
if err != nil {
return err
}
multi_net, err := flexibleengine.NewComputeInstanceV2(ctx, "multi-net", &flexibleengine.ComputeInstanceV2Args{
ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
FlavorId: pulumi.String("s3.large.2"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
Networks: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet_2.Id),
},
},
})
if err != nil {
return err
}
_, err = flexibleengine.NewComputeFloatingipAssociateV2(ctx, "myip", &flexibleengine.ComputeFloatingipAssociateV2Args{
FloatingIp: pulumi.String(eip1.Publicip.ApplyT(func(publicip flexibleengine.VpcEipPublicip) (*string, error) {
return &publicip.IpAddress, nil
}).(pulumi.StringPtrOutput)),
InstanceId: multi_net.ComputeInstanceV2Id,
FixedIp: pulumi.String(multi_net.Networks.ApplyT(func(networks []flexibleengine.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 Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var eip1 = new Flexibleengine.VpcEip("eip1", new()
{
Publicip = new Flexibleengine.Inputs.VpcEipPublicipArgs
{
Type = "5_bgp",
},
Bandwidth = new Flexibleengine.Inputs.VpcEipBandwidthArgs
{
Name = "test",
Size = 10,
ShareType = "PER",
},
});
var multi_net = new Flexibleengine.ComputeInstanceV2("multi-net", new()
{
ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet_2.Id,
},
},
});
var myip = new Flexibleengine.ComputeFloatingipAssociateV2("myip", new()
{
FloatingIp = eip1.Publicip.Apply(publicip => publicip.IpAddress),
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.flexibleengine.VpcEip;
import com.pulumi.flexibleengine.VpcEipArgs;
import com.pulumi.flexibleengine.inputs.VpcEipPublicipArgs;
import com.pulumi.flexibleengine.inputs.VpcEipBandwidthArgs;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.inputs.ComputeInstanceV2NetworkArgs;
import com.pulumi.flexibleengine.ComputeFloatingipAssociateV2;
import com.pulumi.flexibleengine.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) {
var eip1 = new VpcEip("eip1", VpcEipArgs.builder()
.publicip(VpcEipPublicipArgs.builder()
.type("5_bgp")
.build())
.bandwidth(VpcEipBandwidthArgs.builder()
.name("test")
.size(10)
.shareType("PER")
.build())
.build());
var multi_net = new ComputeInstanceV2("multi-net", ComputeInstanceV2Args.builder()
.imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
.flavorId("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.networks(
ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build(),
ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet_2().id())
.build())
.build());
var myip = new ComputeFloatingipAssociateV2("myip", ComputeFloatingipAssociateV2Args.builder()
.floatingIp(eip1.publicip().applyValue(publicip -> publicip.ipAddress()))
.instanceId(multi_net.computeInstanceV2Id())
.fixedIp(multi_net.networks().applyValue(networks -> networks[1].fixedIpV4()))
.build());
}
}
resources:
eip1:
type: flexibleengine:VpcEip
properties:
publicip:
type: 5_bgp
bandwidth:
name: test
size: 10
shareType: PER
multi-net:
type: flexibleengine:ComputeInstanceV2
properties:
imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet_2.id}
myip:
type: flexibleengine:ComputeFloatingipAssociateV2
properties:
floatingIp: ${eip1.publicip.ipAddress}
instanceId: ${["multi-net"].computeInstanceV2Id}
fixedIp: ${["multi-net"].networks[1].fixedIpV4}
Instance with Multiple Ephemeral Disks
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const multi_eph = new flexibleengine.ComputeInstanceV2("multi-eph", {
blockDevices: [
{
bootIndex: 0,
deleteOnTermination: true,
destinationType: "local",
sourceType: "image",
uuid: "<image-id>",
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "local",
sourceType: "blank",
volumeSize: 1,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "local",
sourceType: "blank",
volumeSize: 1,
},
],
flavorId: "s3.large.2",
imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
multi_eph = flexibleengine.ComputeInstanceV2("multi-eph",
block_devices=[
{
"boot_index": 0,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "image",
"uuid": "<image-id>",
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "blank",
"volume_size": 1,
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "blank",
"volume_size": 1,
},
],
flavor_id="s3.large.2",
image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
key_pair="my_key_pair_name",
security_groups=["default"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "multi-eph", &flexibleengine.ComputeInstanceV2Args{
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("image"),
Uuid: pulumi.String("<image-id>"),
},
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
},
FlavorId: pulumi.String("s3.large.2"),
ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
KeyPair: pulumi.String("my_key_pair_name"),
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var multi_eph = new Flexibleengine.ComputeInstanceV2("multi-eph", new()
{
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 0,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "image",
Uuid = "<image-id>",
},
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "blank",
VolumeSize = 1,
},
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "blank",
VolumeSize = 1,
},
},
FlavorId = "s3.large.2",
ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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 multi_eph = new ComputeInstanceV2("multi-eph", ComputeInstanceV2Args.builder()
.blockDevices(
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(0)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("image")
.uuid("<image-id>")
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("blank")
.volumeSize(1)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("blank")
.volumeSize(1)
.build())
.flavorId("s3.large.2")
.imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
.keyPair("my_key_pair_name")
.securityGroups("default")
.build());
}
}
resources:
multi-eph:
type: flexibleengine:ComputeInstanceV2
properties:
blockDevices:
- bootIndex: 0
deleteOnTermination: true
destinationType: local
sourceType: image
uuid: <image-id>
- bootIndex: -1
deleteOnTermination: true
destinationType: local
sourceType: blank
volumeSize: 1
- bootIndex: -1
deleteOnTermination: true
destinationType: local
sourceType: blank
volumeSize: 1
flavorId: s3.large.2
imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
keyPair: my_key_pair_name
securityGroups:
- default
Instance with User Data (cloud-init)
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const instance1 = new flexibleengine.ComputeInstanceV2("instance1", {
imageId: "ad091b52-742f-469e-8f3c-fd81cadf0743",
flavorId: "s3.large.2",
keyPair: "my_key_pair_name",
securityGroups: ["default"],
userData: `#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com`,
networks: [{
uuid: flexibleengine_vpc_subnet_v1.example_subnet.id,
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
instance1 = flexibleengine.ComputeInstanceV2("instance1",
image_id="ad091b52-742f-469e-8f3c-fd81cadf0743",
flavor_id="s3.large.2",
key_pair="my_key_pair_name",
security_groups=["default"],
user_data="""#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com""",
networks=[{
"uuid": flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "instance1", &flexibleengine.ComputeInstanceV2Args{
ImageId: pulumi.String("ad091b52-742f-469e-8f3c-fd81cadf0743"),
FlavorId: pulumi.String("s3.large.2"),
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: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
Uuid: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var instance1 = new Flexibleengine.ComputeInstanceV2("instance1", new()
{
ImageId = "ad091b52-742f-469e-8f3c-fd81cadf0743",
FlavorId = "s3.large.2",
KeyPair = "my_key_pair_name",
SecurityGroups = new[]
{
"default",
},
UserData = @"#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com",
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
Uuid = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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 instance1 = new ComputeInstanceV2("instance1", ComputeInstanceV2Args.builder()
.imageId("ad091b52-742f-469e-8f3c-fd81cadf0743")
.flavorId("s3.large.2")
.keyPair("my_key_pair_name")
.securityGroups("default")
.userData("""
#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com """)
.networks(ComputeInstanceV2NetworkArgs.builder()
.uuid(flexibleengine_vpc_subnet_v1.example_subnet().id())
.build())
.build());
}
}
resources:
instance1:
type: flexibleengine:ComputeInstanceV2
properties:
imageId: ad091b52-742f-469e-8f3c-fd81cadf0743
flavorId: s3.large.2
keyPair: my_key_pair_name
securityGroups:
- default
userData: |-
#cloud-config
hostname: instance_1.example.com
fqdn: instance_1.example.com
networks:
- uuid: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
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 flexibleengine from "@pulumi/flexibleengine";
const foo = new flexibleengine.ComputeInstanceV2("foo", {
blockDevices: [
{
bootIndex: 0,
deleteOnTermination: true,
destinationType: "local",
sourceType: "image",
uuid: "<image uuid>",
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "local",
sourceType: "blank",
volumeSize: 1,
},
{
bootIndex: -1,
deleteOnTermination: true,
destinationType: "local",
sourceType: "blank",
volumeSize: 1,
},
],
securityGroups: ["default"],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
foo = flexibleengine.ComputeInstanceV2("foo",
block_devices=[
{
"boot_index": 0,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "image",
"uuid": "<image uuid>",
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "blank",
"volume_size": 1,
},
{
"boot_index": -1,
"delete_on_termination": True,
"destination_type": "local",
"source_type": "blank",
"volume_size": 1,
},
],
security_groups=["default"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewComputeInstanceV2(ctx, "foo", &flexibleengine.ComputeInstanceV2Args{
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("image"),
Uuid: pulumi.String("<image uuid>"),
},
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
BootIndex: pulumi.Float64(-1),
DeleteOnTermination: pulumi.Bool(true),
DestinationType: pulumi.String("local"),
SourceType: pulumi.String("blank"),
VolumeSize: pulumi.Float64(1),
},
},
SecurityGroups: pulumi.StringArray{
pulumi.String("default"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var foo = new Flexibleengine.ComputeInstanceV2("foo", new()
{
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = 0,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "image",
Uuid = "<image uuid>",
},
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "blank",
VolumeSize = 1,
},
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
BootIndex = -1,
DeleteOnTermination = true,
DestinationType = "local",
SourceType = "blank",
VolumeSize = 1,
},
},
SecurityGroups = new[]
{
"default",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ComputeInstanceV2;
import com.pulumi.flexibleengine.ComputeInstanceV2Args;
import com.pulumi.flexibleengine.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("local")
.sourceType("image")
.uuid("<image uuid>")
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("blank")
.volumeSize(1)
.build(),
ComputeInstanceV2BlockDeviceArgs.builder()
.bootIndex(-1)
.deleteOnTermination(true)
.destinationType("local")
.sourceType("blank")
.volumeSize(1)
.build())
.securityGroups("default")
.build());
}
}
resources:
foo:
type: flexibleengine:ComputeInstanceV2
properties:
blockDevices:
- bootIndex: 0
deleteOnTermination: true
destinationType: local
sourceType: image
uuid: <image uuid>
- bootIndex: -1
deleteOnTermination: true
destinationType: local
sourceType: blank
volumeSize: 1
- bootIndex: -1
deleteOnTermination: true
destinationType: local
sourceType: blank
volumeSize: 1
securityGroups:
- default
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,
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,
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,
personalities: Optional[Sequence[ComputeInstanceV2PersonalityArgs]] = None,
region: Optional[str] = None,
scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
security_groups: Optional[Sequence[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: flexibleengine: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 Flexibleengine.ComputeInstanceV2("computeInstanceV2Resource", new()
{
AdminPass = "string",
AutoRecovery = false,
AvailabilityZone = "string",
BlockDevices = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2BlockDeviceArgs
{
SourceType = "string",
BootIndex = 0,
DeleteOnTermination = false,
DestinationType = "string",
DeviceName = "string",
DeviceType = "string",
DiskBus = "string",
GuestFormat = "string",
Uuid = "string",
VolumeSize = 0,
VolumeType = "string",
},
},
ComputeInstanceV2Id = "string",
ConfigDrive = false,
FlavorId = "string",
FlavorName = "string",
ImageId = "string",
ImageName = "string",
KeyPair = "string",
Metadata =
{
{ "string", "string" },
},
Name = "string",
Networks = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2NetworkArgs
{
AccessNetwork = false,
FixedIpV4 = "string",
FixedIpV6 = "string",
Mac = "string",
Port = "string",
Uuid = "string",
},
},
Personalities = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2PersonalityArgs
{
Content = "string",
File = "string",
},
},
Region = "string",
SchedulerHints = new[]
{
new Flexibleengine.Inputs.ComputeInstanceV2SchedulerHintArgs
{
DehId = "string",
Group = "string",
Tenancy = "string",
},
},
SecurityGroups = new[]
{
"string",
},
StopBeforeDestroy = false,
Tags =
{
{ "string", "string" },
},
Timeouts = new Flexibleengine.Inputs.ComputeInstanceV2TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
UserData = "string",
});
example, err := flexibleengine.NewComputeInstanceV2(ctx, "computeInstanceV2Resource", &flexibleengine.ComputeInstanceV2Args{
AdminPass: pulumi.String("string"),
AutoRecovery: pulumi.Bool(false),
AvailabilityZone: pulumi.String("string"),
BlockDevices: flexibleengine.ComputeInstanceV2BlockDeviceArray{
&flexibleengine.ComputeInstanceV2BlockDeviceArgs{
SourceType: pulumi.String("string"),
BootIndex: pulumi.Float64(0),
DeleteOnTermination: pulumi.Bool(false),
DestinationType: pulumi.String("string"),
DeviceName: pulumi.String("string"),
DeviceType: pulumi.String("string"),
DiskBus: 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),
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: flexibleengine.ComputeInstanceV2NetworkArray{
&flexibleengine.ComputeInstanceV2NetworkArgs{
AccessNetwork: pulumi.Bool(false),
FixedIpV4: pulumi.String("string"),
FixedIpV6: pulumi.String("string"),
Mac: pulumi.String("string"),
Port: pulumi.String("string"),
Uuid: pulumi.String("string"),
},
},
Personalities: flexibleengine.ComputeInstanceV2PersonalityArray{
&flexibleengine.ComputeInstanceV2PersonalityArgs{
Content: pulumi.String("string"),
File: pulumi.String("string"),
},
},
Region: pulumi.String("string"),
SchedulerHints: flexibleengine.ComputeInstanceV2SchedulerHintArray{
&flexibleengine.ComputeInstanceV2SchedulerHintArgs{
DehId: pulumi.String("string"),
Group: pulumi.String("string"),
Tenancy: pulumi.String("string"),
},
},
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
StopBeforeDestroy: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &flexibleengine.ComputeInstanceV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
UserData: pulumi.String("string"),
})
var computeInstanceV2Resource = new ComputeInstanceV2("computeInstanceV2Resource", ComputeInstanceV2Args.builder()
.adminPass("string")
.autoRecovery(false)
.availabilityZone("string")
.blockDevices(ComputeInstanceV2BlockDeviceArgs.builder()
.sourceType("string")
.bootIndex(0)
.deleteOnTermination(false)
.destinationType("string")
.deviceName("string")
.deviceType("string")
.diskBus("string")
.guestFormat("string")
.uuid("string")
.volumeSize(0)
.volumeType("string")
.build())
.computeInstanceV2Id("string")
.configDrive(false)
.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")
.port("string")
.uuid("string")
.build())
.personalities(ComputeInstanceV2PersonalityArgs.builder()
.content("string")
.file("string")
.build())
.region("string")
.schedulerHints(ComputeInstanceV2SchedulerHintArgs.builder()
.dehId("string")
.group("string")
.tenancy("string")
.build())
.securityGroups("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 = flexibleengine.ComputeInstanceV2("computeInstanceV2Resource",
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",
"device_type": "string",
"disk_bus": "string",
"guest_format": "string",
"uuid": "string",
"volume_size": 0,
"volume_type": "string",
}],
compute_instance_v2_id="string",
config_drive=False,
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",
"port": "string",
"uuid": "string",
}],
personalities=[{
"content": "string",
"file": "string",
}],
region="string",
scheduler_hints=[{
"deh_id": "string",
"group": "string",
"tenancy": "string",
}],
security_groups=["string"],
stop_before_destroy=False,
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
user_data="string")
const computeInstanceV2Resource = new flexibleengine.ComputeInstanceV2("computeInstanceV2Resource", {
adminPass: "string",
autoRecovery: false,
availabilityZone: "string",
blockDevices: [{
sourceType: "string",
bootIndex: 0,
deleteOnTermination: false,
destinationType: "string",
deviceName: "string",
deviceType: "string",
diskBus: "string",
guestFormat: "string",
uuid: "string",
volumeSize: 0,
volumeType: "string",
}],
computeInstanceV2Id: "string",
configDrive: false,
flavorId: "string",
flavorName: "string",
imageId: "string",
imageName: "string",
keyPair: "string",
metadata: {
string: "string",
},
name: "string",
networks: [{
accessNetwork: false,
fixedIpV4: "string",
fixedIpV6: "string",
mac: "string",
port: "string",
uuid: "string",
}],
personalities: [{
content: "string",
file: "string",
}],
region: "string",
schedulerHints: [{
dehId: "string",
group: "string",
tenancy: "string",
}],
securityGroups: ["string"],
stopBeforeDestroy: false,
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
userData: "string",
});
type: flexibleengine:ComputeInstanceV2
properties:
adminPass: string
autoRecovery: false
availabilityZone: string
blockDevices:
- bootIndex: 0
deleteOnTermination: false
destinationType: string
deviceName: string
deviceType: string
diskBus: string
guestFormat: string
sourceType: string
uuid: string
volumeSize: 0
volumeType: string
computeInstanceV2Id: string
configDrive: false
flavorId: string
flavorName: string
imageId: string
imageName: string
keyPair: string
metadata:
string: string
name: string
networks:
- accessNetwork: false
fixedIpV4: string
fixedIpV6: string
mac: string
port: string
uuid: string
personalities:
- content: string
file: string
region: string
schedulerHints:
- dehId: string
group: string
tenancy: string
securityGroups:
- 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:
- Admin
Pass string - The administrative password to assign to the server.
- Auto
Recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- Flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - Flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - Image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - Image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- Personalities
List<Compute
Instance V2Personality> - Region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - Scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- Dictionary<string, string>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- Timeouts
Compute
Instance V2Timeouts - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- Admin
Pass string - The administrative password to assign to the server.
- Auto
Recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- Flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - Flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - Image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - Image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- Personalities
[]Compute
Instance V2Personality Args - Region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - Scheduler
Hints []ComputeInstance V2Scheduler Hint Args - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- map[string]string
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- Timeouts
Compute
Instance V2Timeouts Args - User
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- admin
Pass String - The administrative password to assign to the server.
- auto
Recovery Boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id String - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name String - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - image
Id String - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name String - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- personalities
List<Compute
Instance V2Personality> - region String
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- Map<String,String>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- timeouts
Compute
Instance V2Timeouts - user
Data String - The user data to provide when launching the instance. Changing this creates a new server.
- admin
Pass string - The administrative password to assign to the server.
- auto
Recovery boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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}
- The key/value pairs to associate with the instance.
- name string
- A unique name for the resource.
- networks
Compute
Instance V2Network[] - An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.
- personalities
Compute
Instance V2Personality[] - region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints ComputeInstance V2Scheduler Hint[] - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- {[key: string]: string}
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- timeouts
Compute
Instance V2Timeouts - user
Data string - The user data to provide when launching the instance. Changing this creates a new server.
- admin_
pass str - The administrative password to assign to the server.
- auto_
recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor_
id str - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor_
name str - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - image_
id str - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image_
name str - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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]
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- personalities
Sequence[Compute
Instance V2Personality Args] - region str
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler_
hints Sequence[ComputeInstance V2Scheduler Hint Args] - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- Mapping[str, str]
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- timeouts
Compute
Instance V2Timeouts Args - user_
data str - The user data to provide when launching the instance. Changing this creates a new server.
- admin
Pass String - The administrative password to assign to the server.
- auto
Recovery Boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id String - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name String - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - image
Id String - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name String - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- name String
- A unique name for the resource.
- networks List<Property Map>
- An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.
- personalities List<Property Map>
- region String
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints List<Property Map> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the 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 timeout, it will be destroyed anyway.
- Map<String>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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:
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- All
Metadata Dictionary<string, string> - Floating
Ip string - The EIP address that is associate to the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the instance.
- System
Disk stringId - The system disk volume ID.
- Volume
Attacheds List<ComputeInstance V2Volume Attached> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- Access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- Access
Ip stringV6 - The first detected Fixed IPv6 address.
- All
Metadata map[string]string - Floating
Ip string - The EIP address that is associate to the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the instance.
- System
Disk stringId - The system disk volume ID.
- Volume
Attacheds []ComputeInstance V2Volume Attached - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- all
Metadata Map<String,String> - floating
Ip String - The EIP address that is associate to the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the instance.
- system
Disk StringId - The system disk volume ID.
- volume
Attacheds List<ComputeInstance V2Volume Attached> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- access
Ip stringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip stringV6 - The first detected Fixed IPv6 address.
- all
Metadata {[key: string]: string} - floating
Ip string - The EIP address that is associate to the instance.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the instance.
- system
Disk stringId - The system disk volume ID.
- volume
Attacheds ComputeInstance V2Volume Attached[] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- access_
ip_ strv4 - The first detected Fixed IPv4 address or the Floating IP.
- access_
ip_ strv6 - The first detected Fixed IPv6 address.
- all_
metadata Mapping[str, str] - floating_
ip str - The EIP address that is associate to the instance.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the instance.
- system_
disk_ strid - The system disk volume ID.
- volume_
attacheds Sequence[ComputeInstance V2Volume Attached] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- access
Ip StringV4 - The first detected Fixed IPv4 address or the Floating IP.
- access
Ip StringV6 - The first detected Fixed IPv6 address.
- all
Metadata Map<String> - floating
Ip String - The EIP address that is associate to the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the instance.
- system
Disk StringId - The system disk volume ID.
- volume
Attacheds List<Property Map> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
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,
flavor_id: Optional[str] = None,
flavor_name: Optional[str] = None,
floating_ip: 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,
personalities: Optional[Sequence[ComputeInstanceV2PersonalityArgs]] = None,
region: Optional[str] = None,
scheduler_hints: Optional[Sequence[ComputeInstanceV2SchedulerHintArgs]] = None,
security_groups: Optional[Sequence[str]] = None,
status: Optional[str] = None,
stop_before_destroy: Optional[bool] = None,
system_disk_id: Optional[str] = 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: flexibleengine: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.
- All
Metadata Dictionary<string, string> - Auto
Recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- Flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - Flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - Floating
Ip string - The EIP address that is associate to the instance.
- Image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - Image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- Personalities
List<Compute
Instance V2Personality> - Region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - Scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Status string
- The status of the 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 timeout, it will be destroyed anyway.
- System
Disk stringId - The system disk volume ID.
- Dictionary<string, string>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- 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.
- All
Metadata map[string]string - Auto
Recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- Flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - Flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - Floating
Ip string - The EIP address that is associate to the instance.
- Image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - Image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- Personalities
[]Compute
Instance V2Personality Args - Region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - Scheduler
Hints []ComputeInstance V2Scheduler Hint Args - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- Status string
- The status of the 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 timeout, it will be destroyed anyway.
- System
Disk stringId - The system disk volume ID.
- map[string]string
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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 - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- 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.
- all
Metadata Map<String,String> - auto
Recovery Boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id String - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name String - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - floating
Ip String - The EIP address that is associate to the instance.
- image
Id String - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name String - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- personalities
List<Compute
Instance V2Personality> - region String
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints List<ComputeInstance V2Scheduler Hint> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- status String
- The status of the 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 timeout, it will be destroyed anyway.
- system
Disk StringId - The system disk volume ID.
- Map<String,String>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- 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.
- all
Metadata {[key: string]: string} - auto
Recovery boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id string - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name string - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - floating
Ip string - The EIP address that is associate to the instance.
- image
Id string - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name string - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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}
- The key/value pairs to associate with the instance.
- name string
- A unique name for the resource.
- networks
Compute
Instance V2Network[] - An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.
- personalities
Compute
Instance V2Personality[] - region string
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints ComputeInstance V2Scheduler Hint[] - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- status string
- The status of the 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 timeout, it will be destroyed anyway.
- system
Disk stringId - The system disk volume ID.
- {[key: string]: string}
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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[] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- 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.
- all_
metadata Mapping[str, str] - auto_
recovery bool - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor_
id str - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor_
name str - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - floating_
ip str - The EIP address that is associate to the instance.
- image_
id str - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image_
name str - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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]
- The key/value pairs to associate with the instance.
- 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. The network object structure is documented below. Changing this creates a new server.
- personalities
Sequence[Compute
Instance V2Personality Args] - region str
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler_
hints Sequence[ComputeInstance V2Scheduler Hint Args] - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- status str
- The status of the 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 timeout, it will be destroyed anyway.
- system_
disk_ strid - The system disk volume ID.
- Mapping[str, str]
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- 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.
- all
Metadata Map<String> - auto
Recovery Boolean - Configures or deletes automatic recovery of an instance
- 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 object structure is documented below. 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.
- flavor
Id String - The flavor ID of the desired flavor for the server.
It is Required if
flavor_name
is empty. Changing this resizes the existing server. - flavor
Name String - The name of the desired flavor for the server.
It is Required if
flavor_id
is empty. Changing this resizes the existing server. - floating
Ip String - The EIP address that is associate to the instance.
- image
Id String - The image ID of the desired image for the server.
It is Required if
image_name
is empty and not booting from a volume. Do not specify if booting from a volume. Changing this creates a new server. - image
Name String - The name of the desired image for the server.
It is Required if
image_id
is empty and not booting from a volume. Do not specify if booting from a volume. 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>
- The key/value pairs to associate with the instance.
- name String
- A unique name for the resource.
- networks List<Property Map>
- An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.
- personalities List<Property Map>
- region String
- The region in which to create the server instance.
If omitted, the
region
argument of the provider is used. Changing this creates a new server. - scheduler
Hints List<Property Map> - Provide the Nova scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented 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. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.
- status String
- The status of the 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 timeout, it will be destroyed anyway.
- system
Disk StringId - The system disk volume ID.
- Map<String>
Specifies the key/value pairs to associate with the instance.
The
network
block supports:- 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> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- Device
Name string - Device
Type string - Disk
Bus string The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- Guest
Format string - Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
- 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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- Device
Name string - Device
Type string - Disk
Bus string The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- Guest
Format string - Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
- 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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- device
Name String - device
Type String - disk
Bus String The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- guest
Format String - uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
- 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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- device
Name string - device
Type string - disk
Bus string The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- guest
Format string - uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
- 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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- device_
name str - device_
type str - disk_
bus str The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- guest_
format str - uuid str
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
- 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, which indicates that it's a system disk. 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. Possible values are "volume" and "local". Changing this creates a new server.
- device
Name String - device
Type String - disk
Bus String The low-level disk bus that will be used, for example, virtio, scsi. Most common thing is to leave this empty. Changing this creates a new server.
The
scheduler_hints
block supports:- guest
Format String - uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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, source=blank and destination=local, 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). Changing this creates a new server.
ComputeInstanceV2Network, ComputeInstanceV2NetworkArgs
- Access
Network bool Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- Name string
- A unique name for the resource.
- Port string
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- Name string
- A unique name for the resource.
- Port string
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- name String
- A unique name for the resource.
- port String
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- name string
- A unique name for the resource.
- port string
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- name str
- A unique name for the resource.
- port str
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - uuid str
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. 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.
The
block_device
block supports:- 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
- The MAC address of the NIC on that network.
- name String
- A unique name for the resource.
- port String
- The port UUID of a network to attach to the server.
It is Required unless
uuid
is provided. Changing this creates a new server. - uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
ComputeInstanceV2Personality, ComputeInstanceV2PersonalityArgs
ComputeInstanceV2SchedulerHint, ComputeInstanceV2SchedulerHintArgs
- Build
Near stringHost Ip - Deh
Id string - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- Different
Hosts List<string> - Group string
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- Queries List<string>
- Same
Hosts List<string> - Target
Cell string - Tenancy string
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
- Build
Near stringHost Ip - Deh
Id string - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- Different
Hosts []string - Group string
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- Queries []string
- Same
Hosts []string - Target
Cell string - Tenancy string
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
- build
Near StringHost Ip - deh
Id String - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- different
Hosts List<String> - group String
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- queries List<String>
- same
Hosts List<String> - target
Cell String - tenancy String
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
- build
Near stringHost Ip - deh
Id string - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- different
Hosts string[] - group string
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- queries string[]
- same
Hosts string[] - target
Cell string - tenancy string
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
- build_
near_ strhost_ ip - deh_
id str - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- different_
hosts Sequence[str] - group str
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- queries Sequence[str]
- same_
hosts Sequence[str] - target_
cell str - tenancy str
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
- build
Near StringHost Ip - deh
Id String - Specifies the DeH ID.This parameter takes effect only when the value of tenancy is dedicated. If you do not specify this parameter, the system will automatically assign a DeH to you to deploy ECSs.
- different
Hosts List<String> - group String
- Specifies the anti-affinity group ID. The instance will be placed into that group. Changing this creates a new server.
- queries List<String>
- same
Hosts List<String> - target
Cell String - tenancy String
- Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool (default). The value can be shared or dedicated.
ComputeInstanceV2Timeouts, ComputeInstanceV2TimeoutsArgs
ComputeInstanceV2VolumeAttached, ComputeInstanceV2VolumeAttachedArgs
- Boot
Index double - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- Pci
Address string - The volume pci address on that attachment.
- Size double
- The volume size on that attachment.
- Type string
- The volume type on that attachment.
- Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
- Boot
Index float64 - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- Pci
Address string - The volume pci address on that attachment.
- Size float64
- The volume size on that attachment.
- Type string
- The volume type on that attachment.
- Uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
- boot
Index Double - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- pci
Address String - The volume pci address on that attachment.
- size Double
- The volume size on that attachment.
- type String
- The volume type on that attachment.
- uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
- boot
Index number - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- pci
Address string - The volume pci address on that attachment.
- size number
- The volume size on that attachment.
- type string
- The volume type on that attachment.
- uuid string
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
- boot_
index float - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- pci_
address str - The volume pci address on that attachment.
- size float
- The volume size on that attachment.
- type str
- The volume type on that attachment.
- uuid str
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
- boot
Index Number - The boot index of the volume. It defaults to 0, which indicates that it's a system disk. Changing this creates a new server.
- pci
Address String - The volume pci address on that attachment.
- size Number
- The volume size on that attachment.
- type String
- The volume type on that attachment.
- uuid String
- The UUID of the image, volume, or snapshot.
It is Required unless
source_type
is set to"blank"
. Changing this creates a new server.
Import
Instances can be imported by their id
. For example,
$ pulumi import flexibleengine:index/computeInstanceV2:ComputeInstanceV2 my_instance b11b407c-e604-4e8d-8bc4-92398320b847
Note that the imported state may not be identical to your resource definition, due to some attrubutes
missing from the API response, security or some other reason. The missing attributes include:
admin_pass
, config_drive
, user_data
, block_device
, scheduler_hints
, stop_before_destroy
,
network/access_network
and arguments for pre-paid. It is generally recommended running
pulumi preview
after importing an instance. You can then decide if changes should
be applied to the instance, or the resource definition should be updated to align
with the instance. Also you can ignore changes as below.
hcl
resource “flexibleengine_compute_instance_v2” “my_instance” {
...
lifecycle {
ignore_changes = [
user_data, block_device,
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.