yandex.ComputeInstance
Explore with Pulumi AI
A VM instance resource. For more information, see the official documentation.
Example Usage
using System.IO;
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
{
});
var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
{
NetworkId = fooVpcNetwork.Id,
Zone = "ru-central1-a",
});
var @default = new Yandex.ComputeInstance("default", new Yandex.ComputeInstanceArgs
{
BootDisk = new Yandex.Inputs.ComputeInstanceBootDiskArgs
{
InitializeParams = new Yandex.Inputs.ComputeInstanceBootDiskInitializeParamsArgs
{
ImageId = "image_id",
},
},
Metadata =
{
{ "foo", "bar" },
{ "ssh-keys", $"ubuntu:{File.ReadAllText("~/.ssh/id_rsa.pub")}" },
},
NetworkInterfaces =
{
new Yandex.Inputs.ComputeInstanceNetworkInterfaceArgs
{
SubnetId = fooVpcSubnet.Id,
},
},
PlatformId = "standard-v1",
Resources = new Yandex.Inputs.ComputeInstanceResourcesArgs
{
Cores = 2,
Memory = 4,
},
Zone = "ru-central1-a",
});
}
}
package main
import (
"fmt"
"io/ioutil"
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := ioutil.ReadFile(path)
if err != nil {
panic(err.Error())
}
return pulumi.String(string(data))
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
if err != nil {
return err
}
fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
NetworkId: fooVpcNetwork.ID(),
Zone: pulumi.String("ru-central1-a"),
})
if err != nil {
return err
}
_, err = yandex.NewComputeInstance(ctx, "default", &yandex.ComputeInstanceArgs{
BootDisk: &ComputeInstanceBootDiskArgs{
InitializeParams: &ComputeInstanceBootDiskInitializeParamsArgs{
ImageId: pulumi.String("image_id"),
},
},
Metadata: pulumi.StringMap{
"foo": pulumi.String("bar"),
"ssh-keys": pulumi.String(fmt.Sprintf("%v%v", "ubuntu:", readFileOrPanic("~/.ssh/id_rsa.pub"))),
},
NetworkInterfaces: ComputeInstanceNetworkInterfaceArray{
&ComputeInstanceNetworkInterfaceArgs{
SubnetId: fooVpcSubnet.ID(),
},
},
PlatformId: pulumi.String("standard-v1"),
Resources: &ComputeInstanceResourcesArgs{
Cores: pulumi.Int(2),
Memory: pulumi.Float64(4),
},
Zone: pulumi.String("ru-central1-a"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
network_id=foo_vpc_network.id,
zone="ru-central1-a")
default = yandex.ComputeInstance("default",
boot_disk=yandex.ComputeInstanceBootDiskArgs(
initialize_params=yandex.ComputeInstanceBootDiskInitializeParamsArgs(
image_id="image_id",
),
),
metadata={
"foo": "bar",
"ssh-keys": f"ubuntu:{(lambda path: open(path).read())('~/.ssh/id_rsa.pub')}",
},
network_interfaces=[yandex.ComputeInstanceNetworkInterfaceArgs(
subnet_id=foo_vpc_subnet.id,
)],
platform_id="standard-v1",
resources=yandex.ComputeInstanceResourcesArgs(
cores=2,
memory=4,
),
zone="ru-central1-a")
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as yandex from "@pulumi/yandex";
const fooVpcNetwork = new yandex.VpcNetwork("foo", {});
const fooVpcSubnet = new yandex.VpcSubnet("foo", {
networkId: fooVpcNetwork.id,
zone: "ru-central1-a",
});
const defaultComputeInstance = new yandex.ComputeInstance("default", {
bootDisk: {
initializeParams: {
imageId: "image_id",
},
},
metadata: {
foo: "bar",
"ssh-keys": `ubuntu:${fs.readFileSync("~/.ssh/id_rsa.pub", "utf-8")}`,
},
networkInterfaces: [{
subnetId: fooVpcSubnet.id,
}],
platformId: "standard-v1",
resources: {
cores: 2,
memory: 4,
},
zone: "ru-central1-a",
});
Coming soon!
Create ComputeInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComputeInstance(name: string, args: ComputeInstanceArgs, opts?: CustomResourceOptions);
@overload
def ComputeInstance(resource_name: str,
args: ComputeInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ComputeInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_interfaces: Optional[Sequence[ComputeInstanceNetworkInterfaceArgs]] = None,
boot_disk: Optional[ComputeInstanceBootDiskArgs] = None,
resources: Optional[ComputeInstanceResourcesArgs] = None,
hostname: Optional[str] = None,
placement_policy: Optional[ComputeInstancePlacementPolicyArgs] = None,
labels: Optional[Mapping[str, str]] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
network_acceleration_type: Optional[str] = None,
folder_id: Optional[str] = None,
allow_stopping_for_update: Optional[bool] = None,
platform_id: Optional[str] = None,
description: Optional[str] = None,
scheduling_policy: Optional[ComputeInstanceSchedulingPolicyArgs] = None,
secondary_disks: Optional[Sequence[ComputeInstanceSecondaryDiskArgs]] = None,
service_account_id: Optional[str] = None,
zone: Optional[str] = None)
func NewComputeInstance(ctx *Context, name string, args ComputeInstanceArgs, opts ...ResourceOption) (*ComputeInstance, error)
public ComputeInstance(string name, ComputeInstanceArgs args, CustomResourceOptions? opts = null)
public ComputeInstance(String name, ComputeInstanceArgs args)
public ComputeInstance(String name, ComputeInstanceArgs args, CustomResourceOptions options)
type: yandex:ComputeInstance
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 ComputeInstanceArgs
- 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 ComputeInstanceArgs
- 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 ComputeInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComputeInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComputeInstanceArgs
- 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 computeInstanceResource = new Yandex.ComputeInstance("computeInstanceResource", new()
{
NetworkInterfaces = new[]
{
new Yandex.Inputs.ComputeInstanceNetworkInterfaceArgs
{
SubnetId = "string",
Ipv6DnsRecords = new[]
{
new Yandex.Inputs.ComputeInstanceNetworkInterfaceIpv6DnsRecordArgs
{
Fqdn = "string",
DnsZoneId = "string",
Ptr = false,
Ttl = 0,
},
},
IpAddress = "string",
Ipv4 = false,
Ipv6 = false,
Ipv6Address = "string",
DnsRecords = new[]
{
new Yandex.Inputs.ComputeInstanceNetworkInterfaceDnsRecordArgs
{
Fqdn = "string",
DnsZoneId = "string",
Ptr = false,
Ttl = 0,
},
},
MacAddress = "string",
Nat = false,
NatDnsRecords = new[]
{
new Yandex.Inputs.ComputeInstanceNetworkInterfaceNatDnsRecordArgs
{
Fqdn = "string",
DnsZoneId = "string",
Ptr = false,
Ttl = 0,
},
},
NatIpAddress = "string",
NatIpVersion = "string",
SecurityGroupIds = new[]
{
"string",
},
Index = 0,
},
},
BootDisk = new Yandex.Inputs.ComputeInstanceBootDiskArgs
{
AutoDelete = false,
DeviceName = "string",
DiskId = "string",
InitializeParams = new Yandex.Inputs.ComputeInstanceBootDiskInitializeParamsArgs
{
BlockSize = 0,
Description = "string",
ImageId = "string",
Name = "string",
Size = 0,
SnapshotId = "string",
Type = "string",
},
Mode = "string",
},
Resources = new Yandex.Inputs.ComputeInstanceResourcesArgs
{
Cores = 0,
Memory = 0,
CoreFraction = 0,
Gpus = 0,
},
Hostname = "string",
PlacementPolicy = new Yandex.Inputs.ComputeInstancePlacementPolicyArgs
{
PlacementGroupId = "string",
},
Labels =
{
{ "string", "string" },
},
Metadata =
{
{ "string", "string" },
},
Name = "string",
NetworkAccelerationType = "string",
FolderId = "string",
AllowStoppingForUpdate = false,
PlatformId = "string",
Description = "string",
SchedulingPolicy = new Yandex.Inputs.ComputeInstanceSchedulingPolicyArgs
{
Preemptible = false,
},
SecondaryDisks = new[]
{
new Yandex.Inputs.ComputeInstanceSecondaryDiskArgs
{
DiskId = "string",
AutoDelete = false,
DeviceName = "string",
Mode = "string",
},
},
ServiceAccountId = "string",
Zone = "string",
});
example, err := yandex.NewComputeInstance(ctx, "computeInstanceResource", &yandex.ComputeInstanceArgs{
NetworkInterfaces: yandex.ComputeInstanceNetworkInterfaceArray{
&yandex.ComputeInstanceNetworkInterfaceArgs{
SubnetId: pulumi.String("string"),
Ipv6DnsRecords: yandex.ComputeInstanceNetworkInterfaceIpv6DnsRecordArray{
&yandex.ComputeInstanceNetworkInterfaceIpv6DnsRecordArgs{
Fqdn: pulumi.String("string"),
DnsZoneId: pulumi.String("string"),
Ptr: pulumi.Bool(false),
Ttl: pulumi.Int(0),
},
},
IpAddress: pulumi.String("string"),
Ipv4: pulumi.Bool(false),
Ipv6: pulumi.Bool(false),
Ipv6Address: pulumi.String("string"),
DnsRecords: yandex.ComputeInstanceNetworkInterfaceDnsRecordArray{
&yandex.ComputeInstanceNetworkInterfaceDnsRecordArgs{
Fqdn: pulumi.String("string"),
DnsZoneId: pulumi.String("string"),
Ptr: pulumi.Bool(false),
Ttl: pulumi.Int(0),
},
},
MacAddress: pulumi.String("string"),
Nat: pulumi.Bool(false),
NatDnsRecords: yandex.ComputeInstanceNetworkInterfaceNatDnsRecordArray{
&yandex.ComputeInstanceNetworkInterfaceNatDnsRecordArgs{
Fqdn: pulumi.String("string"),
DnsZoneId: pulumi.String("string"),
Ptr: pulumi.Bool(false),
Ttl: pulumi.Int(0),
},
},
NatIpAddress: pulumi.String("string"),
NatIpVersion: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Index: pulumi.Int(0),
},
},
BootDisk: &yandex.ComputeInstanceBootDiskArgs{
AutoDelete: pulumi.Bool(false),
DeviceName: pulumi.String("string"),
DiskId: pulumi.String("string"),
InitializeParams: &yandex.ComputeInstanceBootDiskInitializeParamsArgs{
BlockSize: pulumi.Int(0),
Description: pulumi.String("string"),
ImageId: pulumi.String("string"),
Name: pulumi.String("string"),
Size: pulumi.Int(0),
SnapshotId: pulumi.String("string"),
Type: pulumi.String("string"),
},
Mode: pulumi.String("string"),
},
Resources: &yandex.ComputeInstanceResourcesArgs{
Cores: pulumi.Int(0),
Memory: pulumi.Float64(0),
CoreFraction: pulumi.Int(0),
Gpus: pulumi.Int(0),
},
Hostname: pulumi.String("string"),
PlacementPolicy: &yandex.ComputeInstancePlacementPolicyArgs{
PlacementGroupId: pulumi.String("string"),
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
NetworkAccelerationType: pulumi.String("string"),
FolderId: pulumi.String("string"),
AllowStoppingForUpdate: pulumi.Bool(false),
PlatformId: pulumi.String("string"),
Description: pulumi.String("string"),
SchedulingPolicy: &yandex.ComputeInstanceSchedulingPolicyArgs{
Preemptible: pulumi.Bool(false),
},
SecondaryDisks: yandex.ComputeInstanceSecondaryDiskArray{
&yandex.ComputeInstanceSecondaryDiskArgs{
DiskId: pulumi.String("string"),
AutoDelete: pulumi.Bool(false),
DeviceName: pulumi.String("string"),
Mode: pulumi.String("string"),
},
},
ServiceAccountId: pulumi.String("string"),
Zone: pulumi.String("string"),
})
var computeInstanceResource = new ComputeInstance("computeInstanceResource", ComputeInstanceArgs.builder()
.networkInterfaces(ComputeInstanceNetworkInterfaceArgs.builder()
.subnetId("string")
.ipv6DnsRecords(ComputeInstanceNetworkInterfaceIpv6DnsRecordArgs.builder()
.fqdn("string")
.dnsZoneId("string")
.ptr(false)
.ttl(0)
.build())
.ipAddress("string")
.ipv4(false)
.ipv6(false)
.ipv6Address("string")
.dnsRecords(ComputeInstanceNetworkInterfaceDnsRecordArgs.builder()
.fqdn("string")
.dnsZoneId("string")
.ptr(false)
.ttl(0)
.build())
.macAddress("string")
.nat(false)
.natDnsRecords(ComputeInstanceNetworkInterfaceNatDnsRecordArgs.builder()
.fqdn("string")
.dnsZoneId("string")
.ptr(false)
.ttl(0)
.build())
.natIpAddress("string")
.natIpVersion("string")
.securityGroupIds("string")
.index(0)
.build())
.bootDisk(ComputeInstanceBootDiskArgs.builder()
.autoDelete(false)
.deviceName("string")
.diskId("string")
.initializeParams(ComputeInstanceBootDiskInitializeParamsArgs.builder()
.blockSize(0)
.description("string")
.imageId("string")
.name("string")
.size(0)
.snapshotId("string")
.type("string")
.build())
.mode("string")
.build())
.resources(ComputeInstanceResourcesArgs.builder()
.cores(0)
.memory(0)
.coreFraction(0)
.gpus(0)
.build())
.hostname("string")
.placementPolicy(ComputeInstancePlacementPolicyArgs.builder()
.placementGroupId("string")
.build())
.labels(Map.of("string", "string"))
.metadata(Map.of("string", "string"))
.name("string")
.networkAccelerationType("string")
.folderId("string")
.allowStoppingForUpdate(false)
.platformId("string")
.description("string")
.schedulingPolicy(ComputeInstanceSchedulingPolicyArgs.builder()
.preemptible(false)
.build())
.secondaryDisks(ComputeInstanceSecondaryDiskArgs.builder()
.diskId("string")
.autoDelete(false)
.deviceName("string")
.mode("string")
.build())
.serviceAccountId("string")
.zone("string")
.build());
compute_instance_resource = yandex.ComputeInstance("computeInstanceResource",
network_interfaces=[{
"subnet_id": "string",
"ipv6_dns_records": [{
"fqdn": "string",
"dns_zone_id": "string",
"ptr": False,
"ttl": 0,
}],
"ip_address": "string",
"ipv4": False,
"ipv6": False,
"ipv6_address": "string",
"dns_records": [{
"fqdn": "string",
"dns_zone_id": "string",
"ptr": False,
"ttl": 0,
}],
"mac_address": "string",
"nat": False,
"nat_dns_records": [{
"fqdn": "string",
"dns_zone_id": "string",
"ptr": False,
"ttl": 0,
}],
"nat_ip_address": "string",
"nat_ip_version": "string",
"security_group_ids": ["string"],
"index": 0,
}],
boot_disk={
"auto_delete": False,
"device_name": "string",
"disk_id": "string",
"initialize_params": {
"block_size": 0,
"description": "string",
"image_id": "string",
"name": "string",
"size": 0,
"snapshot_id": "string",
"type": "string",
},
"mode": "string",
},
resources={
"cores": 0,
"memory": 0,
"core_fraction": 0,
"gpus": 0,
},
hostname="string",
placement_policy={
"placement_group_id": "string",
},
labels={
"string": "string",
},
metadata={
"string": "string",
},
name="string",
network_acceleration_type="string",
folder_id="string",
allow_stopping_for_update=False,
platform_id="string",
description="string",
scheduling_policy={
"preemptible": False,
},
secondary_disks=[{
"disk_id": "string",
"auto_delete": False,
"device_name": "string",
"mode": "string",
}],
service_account_id="string",
zone="string")
const computeInstanceResource = new yandex.ComputeInstance("computeInstanceResource", {
networkInterfaces: [{
subnetId: "string",
ipv6DnsRecords: [{
fqdn: "string",
dnsZoneId: "string",
ptr: false,
ttl: 0,
}],
ipAddress: "string",
ipv4: false,
ipv6: false,
ipv6Address: "string",
dnsRecords: [{
fqdn: "string",
dnsZoneId: "string",
ptr: false,
ttl: 0,
}],
macAddress: "string",
nat: false,
natDnsRecords: [{
fqdn: "string",
dnsZoneId: "string",
ptr: false,
ttl: 0,
}],
natIpAddress: "string",
natIpVersion: "string",
securityGroupIds: ["string"],
index: 0,
}],
bootDisk: {
autoDelete: false,
deviceName: "string",
diskId: "string",
initializeParams: {
blockSize: 0,
description: "string",
imageId: "string",
name: "string",
size: 0,
snapshotId: "string",
type: "string",
},
mode: "string",
},
resources: {
cores: 0,
memory: 0,
coreFraction: 0,
gpus: 0,
},
hostname: "string",
placementPolicy: {
placementGroupId: "string",
},
labels: {
string: "string",
},
metadata: {
string: "string",
},
name: "string",
networkAccelerationType: "string",
folderId: "string",
allowStoppingForUpdate: false,
platformId: "string",
description: "string",
schedulingPolicy: {
preemptible: false,
},
secondaryDisks: [{
diskId: "string",
autoDelete: false,
deviceName: "string",
mode: "string",
}],
serviceAccountId: "string",
zone: "string",
});
type: yandex:ComputeInstance
properties:
allowStoppingForUpdate: false
bootDisk:
autoDelete: false
deviceName: string
diskId: string
initializeParams:
blockSize: 0
description: string
imageId: string
name: string
size: 0
snapshotId: string
type: string
mode: string
description: string
folderId: string
hostname: string
labels:
string: string
metadata:
string: string
name: string
networkAccelerationType: string
networkInterfaces:
- dnsRecords:
- dnsZoneId: string
fqdn: string
ptr: false
ttl: 0
index: 0
ipAddress: string
ipv4: false
ipv6: false
ipv6Address: string
ipv6DnsRecords:
- dnsZoneId: string
fqdn: string
ptr: false
ttl: 0
macAddress: string
nat: false
natDnsRecords:
- dnsZoneId: string
fqdn: string
ptr: false
ttl: 0
natIpAddress: string
natIpVersion: string
securityGroupIds:
- string
subnetId: string
placementPolicy:
placementGroupId: string
platformId: string
resources:
coreFraction: 0
cores: 0
gpus: 0
memory: 0
schedulingPolicy:
preemptible: false
secondaryDisks:
- autoDelete: false
deviceName: string
diskId: string
mode: string
serviceAccountId: string
zone: string
ComputeInstance 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 ComputeInstance resource accepts the following input properties:
- Boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- Network
Interfaces List<ComputeInstance Network Interface> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- Resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- Allow
Stopping boolFor Update - Description string
- Description of the boot disk.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the instance.
- Metadata Dictionary<string, string>
- Metadata key/value pairs to make available from within the instance.
- Name string
- Name of the boot disk.
- Network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- Placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- Platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- Scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- Secondary
Disks List<ComputeInstance Secondary Disk> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - Service
Account stringId - ID of the service account authorized for this instance.
- Zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- Boot
Disk ComputeInstance Boot Disk Args - The boot disk for the instance. The structure is documented below.
- Network
Interfaces []ComputeInstance Network Interface Args - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- Resources
Compute
Instance Resources Args - Compute resources that are allocated for the instance. The structure is documented below.
- Allow
Stopping boolFor Update - Description string
- Description of the boot disk.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - Labels map[string]string
- A set of key/value label pairs to assign to the instance.
- Metadata map[string]string
- Metadata key/value pairs to make available from within the instance.
- Name string
- Name of the boot disk.
- Network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- Placement
Policy ComputeInstance Placement Policy Args - The placement policy configuration. The structure is documented below.
- Platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- Scheduling
Policy ComputeInstance Scheduling Policy Args - Scheduling policy configuration. The structure is documented below.
- Secondary
Disks []ComputeInstance Secondary Disk Args - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - Service
Account stringId - ID of the service account authorized for this instance.
- Zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- network
Interfaces List<ComputeInstance Network Interface> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- allow
Stopping BooleanFor Update - description String
- Description of the boot disk.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- hostname String
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Map<String,String>
- A set of key/value label pairs to assign to the instance.
- metadata Map<String,String>
- Metadata key/value pairs to make available from within the instance.
- name String
- Name of the boot disk.
- network
Acceleration StringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- platform
Id String - The type of virtual machine to create. The default is 'standard-v1'.
- scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- secondary
Disks List<ComputeInstance Secondary Disk> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account StringId - ID of the service account authorized for this instance.
- zone String
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- network
Interfaces ComputeInstance Network Interface[] - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- allow
Stopping booleanFor Update - description string
- Description of the boot disk.
- folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels {[key: string]: string}
- A set of key/value label pairs to assign to the instance.
- metadata {[key: string]: string}
- Metadata key/value pairs to make available from within the instance.
- name string
- Name of the boot disk.
- network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- secondary
Disks ComputeInstance Secondary Disk[] - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account stringId - ID of the service account authorized for this instance.
- zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- boot_
disk ComputeInstance Boot Disk Args - The boot disk for the instance. The structure is documented below.
- network_
interfaces Sequence[ComputeInstance Network Interface Args] - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- resources
Compute
Instance Resources Args - Compute resources that are allocated for the instance. The structure is documented below.
- allow_
stopping_ boolfor_ update - description str
- Description of the boot disk.
- folder_
id str - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- hostname str
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Mapping[str, str]
- A set of key/value label pairs to assign to the instance.
- metadata Mapping[str, str]
- Metadata key/value pairs to make available from within the instance.
- name str
- Name of the boot disk.
- network_
acceleration_ strtype - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- placement_
policy ComputeInstance Placement Policy Args - The placement policy configuration. The structure is documented below.
- platform_
id str - The type of virtual machine to create. The default is 'standard-v1'.
- scheduling_
policy ComputeInstance Scheduling Policy Args - Scheduling policy configuration. The structure is documented below.
- secondary_
disks Sequence[ComputeInstance Secondary Disk Args] - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service_
account_ strid - ID of the service account authorized for this instance.
- zone str
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- boot
Disk Property Map - The boot disk for the instance. The structure is documented below.
- network
Interfaces List<Property Map> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- resources Property Map
- Compute resources that are allocated for the instance. The structure is documented below.
- allow
Stopping BooleanFor Update - description String
- Description of the boot disk.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- hostname String
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Map<String>
- A set of key/value label pairs to assign to the instance.
- metadata Map<String>
- Metadata key/value pairs to make available from within the instance.
- name String
- Name of the boot disk.
- network
Acceleration StringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- placement
Policy Property Map - The placement policy configuration. The structure is documented below.
- platform
Id String - The type of virtual machine to create. The default is 'standard-v1'.
- scheduling
Policy Property Map - Scheduling policy configuration. The structure is documented below.
- secondary
Disks List<Property Map> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account StringId - ID of the service account authorized for this instance.
- zone String
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComputeInstance resource produces the following output properties:
- created_
at str - Creation timestamp of the instance.
- fqdn str
- DNS record FQDN (must have a dot at the end).
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of this instance.
Look up Existing ComputeInstance Resource
Get an existing ComputeInstance 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?: ComputeInstanceState, opts?: CustomResourceOptions): ComputeInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_stopping_for_update: Optional[bool] = None,
boot_disk: Optional[ComputeInstanceBootDiskArgs] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
fqdn: Optional[str] = None,
hostname: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
network_acceleration_type: Optional[str] = None,
network_interfaces: Optional[Sequence[ComputeInstanceNetworkInterfaceArgs]] = None,
placement_policy: Optional[ComputeInstancePlacementPolicyArgs] = None,
platform_id: Optional[str] = None,
resources: Optional[ComputeInstanceResourcesArgs] = None,
scheduling_policy: Optional[ComputeInstanceSchedulingPolicyArgs] = None,
secondary_disks: Optional[Sequence[ComputeInstanceSecondaryDiskArgs]] = None,
service_account_id: Optional[str] = None,
status: Optional[str] = None,
zone: Optional[str] = None) -> ComputeInstance
func GetComputeInstance(ctx *Context, name string, id IDInput, state *ComputeInstanceState, opts ...ResourceOption) (*ComputeInstance, error)
public static ComputeInstance Get(string name, Input<string> id, ComputeInstanceState? state, CustomResourceOptions? opts = null)
public static ComputeInstance get(String name, Output<String> id, ComputeInstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
Stopping boolFor Update - Boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- Created
At string - Creation timestamp of the instance.
- Description string
- Description of the boot disk.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Fqdn string
- DNS record FQDN (must have a dot at the end).
- Hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the instance.
- Metadata Dictionary<string, string>
- Metadata key/value pairs to make available from within the instance.
- Name string
- Name of the boot disk.
- Network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- Network
Interfaces List<ComputeInstance Network Interface> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- Placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- Platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- Resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- Scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- Secondary
Disks List<ComputeInstance Secondary Disk> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - Service
Account stringId - ID of the service account authorized for this instance.
- Status string
- The status of this instance.
- Zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- Allow
Stopping boolFor Update - Boot
Disk ComputeInstance Boot Disk Args - The boot disk for the instance. The structure is documented below.
- Created
At string - Creation timestamp of the instance.
- Description string
- Description of the boot disk.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Fqdn string
- DNS record FQDN (must have a dot at the end).
- Hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - Labels map[string]string
- A set of key/value label pairs to assign to the instance.
- Metadata map[string]string
- Metadata key/value pairs to make available from within the instance.
- Name string
- Name of the boot disk.
- Network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- Network
Interfaces []ComputeInstance Network Interface Args - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- Placement
Policy ComputeInstance Placement Policy Args - The placement policy configuration. The structure is documented below.
- Platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- Resources
Compute
Instance Resources Args - Compute resources that are allocated for the instance. The structure is documented below.
- Scheduling
Policy ComputeInstance Scheduling Policy Args - Scheduling policy configuration. The structure is documented below.
- Secondary
Disks []ComputeInstance Secondary Disk Args - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - Service
Account stringId - ID of the service account authorized for this instance.
- Status string
- The status of this instance.
- Zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- allow
Stopping BooleanFor Update - boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- created
At String - Creation timestamp of the instance.
- description String
- Description of the boot disk.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- fqdn String
- DNS record FQDN (must have a dot at the end).
- hostname String
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Map<String,String>
- A set of key/value label pairs to assign to the instance.
- metadata Map<String,String>
- Metadata key/value pairs to make available from within the instance.
- name String
- Name of the boot disk.
- network
Acceleration StringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- network
Interfaces List<ComputeInstance Network Interface> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- platform
Id String - The type of virtual machine to create. The default is 'standard-v1'.
- resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- secondary
Disks List<ComputeInstance Secondary Disk> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account StringId - ID of the service account authorized for this instance.
- status String
- The status of this instance.
- zone String
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- allow
Stopping booleanFor Update - boot
Disk ComputeInstance Boot Disk - The boot disk for the instance. The structure is documented below.
- created
At string - Creation timestamp of the instance.
- description string
- Description of the boot disk.
- folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- fqdn string
- DNS record FQDN (must have a dot at the end).
- hostname string
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels {[key: string]: string}
- A set of key/value label pairs to assign to the instance.
- metadata {[key: string]: string}
- Metadata key/value pairs to make available from within the instance.
- name string
- Name of the boot disk.
- network
Acceleration stringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- network
Interfaces ComputeInstance Network Interface[] - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- placement
Policy ComputeInstance Placement Policy - The placement policy configuration. The structure is documented below.
- platform
Id string - The type of virtual machine to create. The default is 'standard-v1'.
- resources
Compute
Instance Resources - Compute resources that are allocated for the instance. The structure is documented below.
- scheduling
Policy ComputeInstance Scheduling Policy - Scheduling policy configuration. The structure is documented below.
- secondary
Disks ComputeInstance Secondary Disk[] - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account stringId - ID of the service account authorized for this instance.
- status string
- The status of this instance.
- zone string
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- allow_
stopping_ boolfor_ update - boot_
disk ComputeInstance Boot Disk Args - The boot disk for the instance. The structure is documented below.
- created_
at str - Creation timestamp of the instance.
- description str
- Description of the boot disk.
- folder_
id str - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- fqdn str
- DNS record FQDN (must have a dot at the end).
- hostname str
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Mapping[str, str]
- A set of key/value label pairs to assign to the instance.
- metadata Mapping[str, str]
- Metadata key/value pairs to make available from within the instance.
- name str
- Name of the boot disk.
- network_
acceleration_ strtype - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- network_
interfaces Sequence[ComputeInstance Network Interface Args] - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- placement_
policy ComputeInstance Placement Policy Args - The placement policy configuration. The structure is documented below.
- platform_
id str - The type of virtual machine to create. The default is 'standard-v1'.
- resources
Compute
Instance Resources Args - Compute resources that are allocated for the instance. The structure is documented below.
- scheduling_
policy ComputeInstance Scheduling Policy Args - Scheduling policy configuration. The structure is documented below.
- secondary_
disks Sequence[ComputeInstance Secondary Disk Args] - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service_
account_ strid - ID of the service account authorized for this instance.
- status str
- The status of this instance.
- zone str
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
- allow
Stopping BooleanFor Update - boot
Disk Property Map - The boot disk for the instance. The structure is documented below.
- created
At String - Creation timestamp of the instance.
- description String
- Description of the boot disk.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- fqdn String
- DNS record FQDN (must have a dot at the end).
- hostname String
- Host name for the instance. This field is used to generate the instance
fqdn
value. The host name must be unique within the network and region. If not specified, the host name will be equal toid
of the instance andfqdn
will be<id>.auto.internal
. Otherwise FQDN will be<hostname>.<region_id>.internal
. - labels Map<String>
- A set of key/value label pairs to assign to the instance.
- metadata Map<String>
- Metadata key/value pairs to make available from within the instance.
- name String
- Name of the boot disk.
- network
Acceleration StringType - Type of network acceleration. The default is
standard
. Values:standard
,software_accelerated
- network
Interfaces List<Property Map> - Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
- placement
Policy Property Map - The placement policy configuration. The structure is documented below.
- platform
Id String - The type of virtual machine to create. The default is 'standard-v1'.
- resources Property Map
- Compute resources that are allocated for the instance. The structure is documented below.
- scheduling
Policy Property Map - Scheduling policy configuration. The structure is documented below.
- secondary
Disks List<Property Map> - A list of disks to attach to the instance. The structure is documented below.
Note: The
allow_stopping_for_update
property must be set to true in order to update this structure. - service
Account StringId - ID of the service account authorized for this instance.
- status String
- The status of this instance.
- zone String
- The availability zone where the virtual machine will be created. If it is not provided, the default provider folder is used.
Supporting Types
ComputeInstanceBootDisk, ComputeInstanceBootDiskArgs
- Auto
Delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- Device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - Disk
Id string - ID of the disk that is attached to the instance.
- Initialize
Params ComputeInstance Boot Disk Initialize Params - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - Mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- Auto
Delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- Device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - Disk
Id string - ID of the disk that is attached to the instance.
- Initialize
Params ComputeInstance Boot Disk Initialize Params - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - Mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- auto
Delete Boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name String - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - disk
Id String - ID of the disk that is attached to the instance.
- initialize
Params ComputeInstance Boot Disk Initialize Params - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - mode String
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- auto
Delete boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - disk
Id string - ID of the disk that is attached to the instance.
- initialize
Params ComputeInstance Boot Disk Initialize Params - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- auto_
delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device_
name str - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - disk_
id str - ID of the disk that is attached to the instance.
- initialize_
params ComputeInstance Boot Disk Initialize Params - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - mode str
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- auto
Delete Boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name String - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - disk
Id String - ID of the disk that is attached to the instance.
- initialize
Params Property Map - Parameters for a new disk that will be created
alongside the new instance. Either
initialize_params
ordisk_id
must be set. The structure is documented below. - mode String
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
ComputeInstanceBootDiskInitializeParams, ComputeInstanceBootDiskInitializeParamsArgs
- Block
Size int - Description string
- Description of the boot disk.
- Image
Id string - A disk image to initialize this disk from.
- Name string
- Name of the boot disk.
- Size int
- Size of the disk in GB.
- Snapshot
Id string - A snapshot to initialize this disk from.
- Type string
- Disk type.
- Block
Size int - Description string
- Description of the boot disk.
- Image
Id string - A disk image to initialize this disk from.
- Name string
- Name of the boot disk.
- Size int
- Size of the disk in GB.
- Snapshot
Id string - A snapshot to initialize this disk from.
- Type string
- Disk type.
- block
Size Integer - description String
- Description of the boot disk.
- image
Id String - A disk image to initialize this disk from.
- name String
- Name of the boot disk.
- size Integer
- Size of the disk in GB.
- snapshot
Id String - A snapshot to initialize this disk from.
- type String
- Disk type.
- block
Size number - description string
- Description of the boot disk.
- image
Id string - A disk image to initialize this disk from.
- name string
- Name of the boot disk.
- size number
- Size of the disk in GB.
- snapshot
Id string - A snapshot to initialize this disk from.
- type string
- Disk type.
- block_
size int - description str
- Description of the boot disk.
- image_
id str - A disk image to initialize this disk from.
- name str
- Name of the boot disk.
- size int
- Size of the disk in GB.
- snapshot_
id str - A snapshot to initialize this disk from.
- type str
- Disk type.
- block
Size Number - description String
- Description of the boot disk.
- image
Id String - A disk image to initialize this disk from.
- name String
- Name of the boot disk.
- size Number
- Size of the disk in GB.
- snapshot
Id String - A snapshot to initialize this disk from.
- type String
- Disk type.
ComputeInstanceNetworkInterface, ComputeInstanceNetworkInterfaceArgs
- Subnet
Id string - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- Dns
Records List<ComputeInstance Network Interface Dns Record> - List of configurations for creating ipv4 DNS records. The structure is documented below.
- Index int
- Ip
Address string - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- Ipv4 bool
- Allocate an IPv4 address for the interface. The default value is
true
. - Ipv6 bool
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- Ipv6Address string
- The private IPv6 address to assign to the instance.
- Ipv6Dns
Records List<ComputeInstance Network Interface Ipv6Dns Record> - List of configurations for creating ipv6 DNS records. The structure is documented below.
- Mac
Address string - Nat bool
- Provide a public address, for instance, to access the internet over NAT.
- Nat
Dns List<ComputeRecords Instance Network Interface Nat Dns Record> - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- Nat
Ip stringAddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- Nat
Ip stringVersion - Security
Group List<string>Ids - Security group ids for network interface.
- Subnet
Id string - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- Dns
Records []ComputeInstance Network Interface Dns Record - List of configurations for creating ipv4 DNS records. The structure is documented below.
- Index int
- Ip
Address string - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- Ipv4 bool
- Allocate an IPv4 address for the interface. The default value is
true
. - Ipv6 bool
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- Ipv6Address string
- The private IPv6 address to assign to the instance.
- Ipv6Dns
Records []ComputeInstance Network Interface Ipv6Dns Record - List of configurations for creating ipv6 DNS records. The structure is documented below.
- Mac
Address string - Nat bool
- Provide a public address, for instance, to access the internet over NAT.
- Nat
Dns []ComputeRecords Instance Network Interface Nat Dns Record - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- Nat
Ip stringAddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- Nat
Ip stringVersion - Security
Group []stringIds - Security group ids for network interface.
- subnet
Id String - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- dns
Records List<ComputeInstance Network Interface Dns Record> - List of configurations for creating ipv4 DNS records. The structure is documented below.
- index Integer
- ip
Address String - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- ipv4 Boolean
- Allocate an IPv4 address for the interface. The default value is
true
. - ipv6 Boolean
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- ipv6Address String
- The private IPv6 address to assign to the instance.
- ipv6Dns
Records List<ComputeInstance Network Interface Ipv6Dns Record> - List of configurations for creating ipv6 DNS records. The structure is documented below.
- mac
Address String - nat Boolean
- Provide a public address, for instance, to access the internet over NAT.
- nat
Dns List<ComputeRecords Instance Network Interface Nat Dns Record> - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- nat
Ip StringAddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- nat
Ip StringVersion - security
Group List<String>Ids - Security group ids for network interface.
- subnet
Id string - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- dns
Records ComputeInstance Network Interface Dns Record[] - List of configurations for creating ipv4 DNS records. The structure is documented below.
- index number
- ip
Address string - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- ipv4 boolean
- Allocate an IPv4 address for the interface. The default value is
true
. - ipv6 boolean
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- ipv6Address string
- The private IPv6 address to assign to the instance.
- ipv6Dns
Records ComputeInstance Network Interface Ipv6Dns Record[] - List of configurations for creating ipv6 DNS records. The structure is documented below.
- mac
Address string - nat boolean
- Provide a public address, for instance, to access the internet over NAT.
- nat
Dns ComputeRecords Instance Network Interface Nat Dns Record[] - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- nat
Ip stringAddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- nat
Ip stringVersion - security
Group string[]Ids - Security group ids for network interface.
- subnet_
id str - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- dns_
records Sequence[ComputeInstance Network Interface Dns Record] - List of configurations for creating ipv4 DNS records. The structure is documented below.
- index int
- ip_
address str - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- ipv4 bool
- Allocate an IPv4 address for the interface. The default value is
true
. - ipv6 bool
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- ipv6_
address str - The private IPv6 address to assign to the instance.
- ipv6_
dns_ Sequence[Computerecords Instance Network Interface Ipv6Dns Record] - List of configurations for creating ipv6 DNS records. The structure is documented below.
- mac_
address str - nat bool
- Provide a public address, for instance, to access the internet over NAT.
- nat_
dns_ Sequence[Computerecords Instance Network Interface Nat Dns Record] - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- nat_
ip_ straddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- nat_
ip_ strversion - security_
group_ Sequence[str]ids - Security group ids for network interface.
- subnet
Id String - ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
- dns
Records List<Property Map> - List of configurations for creating ipv4 DNS records. The structure is documented below.
- index Number
- ip
Address String - The private IP address to assign to the instance. If empty, the address will be automatically assigned from the specified subnet.
- ipv4 Boolean
- Allocate an IPv4 address for the interface. The default value is
true
. - ipv6 Boolean
- If true, allocate an IPv6 address for the interface. The address will be automatically assigned from the specified subnet.
- ipv6Address String
- The private IPv6 address to assign to the instance.
- ipv6Dns
Records List<Property Map> - List of configurations for creating ipv6 DNS records. The structure is documented below.
- mac
Address String - nat Boolean
- Provide a public address, for instance, to access the internet over NAT.
- nat
Dns List<Property Map>Records - List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
- nat
Ip StringAddress - Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
- nat
Ip StringVersion - security
Group List<String>Ids - Security group ids for network interface.
ComputeInstanceNetworkInterfaceDnsRecord, ComputeInstanceNetworkInterfaceDnsRecordArgs
- fqdn str
- DNS record FQDN (must have a dot at the end).
- dns_
zone_ strid - DNS zone ID (if not set, private zone used).
- ptr bool
- When set to true, also create a PTR DNS record.
- ttl int
- DNS record TTL. in seconds
ComputeInstanceNetworkInterfaceIpv6DnsRecord, ComputeInstanceNetworkInterfaceIpv6DnsRecordArgs
- fqdn str
- DNS record FQDN (must have a dot at the end).
- dns_
zone_ strid - DNS zone ID (if not set, private zone used).
- ptr bool
- When set to true, also create a PTR DNS record.
- ttl int
- DNS record TTL. in seconds
ComputeInstanceNetworkInterfaceNatDnsRecord, ComputeInstanceNetworkInterfaceNatDnsRecordArgs
- fqdn str
- DNS record FQDN (must have a dot at the end).
- dns_
zone_ strid - DNS zone ID (if not set, private zone used).
- ptr bool
- When set to true, also create a PTR DNS record.
- ttl int
- DNS record TTL. in seconds
ComputeInstancePlacementPolicy, ComputeInstancePlacementPolicyArgs
- Placement
Group stringId - Specifies the id of the Placement Group to assign to the instance.
- Placement
Group stringId - Specifies the id of the Placement Group to assign to the instance.
- placement
Group StringId - Specifies the id of the Placement Group to assign to the instance.
- placement
Group stringId - Specifies the id of the Placement Group to assign to the instance.
- placement_
group_ strid - Specifies the id of the Placement Group to assign to the instance.
- placement
Group StringId - Specifies the id of the Placement Group to assign to the instance.
ComputeInstanceResources, ComputeInstanceResourcesArgs
- Cores int
- CPU cores for the instance.
- Memory double
- Memory size in GB.
- Core
Fraction int - If provided, specifies baseline performance for a core as a percent.
- Gpus int
- Cores int
- CPU cores for the instance.
- Memory float64
- Memory size in GB.
- Core
Fraction int - If provided, specifies baseline performance for a core as a percent.
- Gpus int
- cores Integer
- CPU cores for the instance.
- memory Double
- Memory size in GB.
- core
Fraction Integer - If provided, specifies baseline performance for a core as a percent.
- gpus Integer
- cores number
- CPU cores for the instance.
- memory number
- Memory size in GB.
- core
Fraction number - If provided, specifies baseline performance for a core as a percent.
- gpus number
- cores int
- CPU cores for the instance.
- memory float
- Memory size in GB.
- core_
fraction int - If provided, specifies baseline performance for a core as a percent.
- gpus int
- cores Number
- CPU cores for the instance.
- memory Number
- Memory size in GB.
- core
Fraction Number - If provided, specifies baseline performance for a core as a percent.
- gpus Number
ComputeInstanceSchedulingPolicy, ComputeInstanceSchedulingPolicyArgs
- Preemptible bool
- Specifies if the instance is preemptible. Defaults to false.
- Preemptible bool
- Specifies if the instance is preemptible. Defaults to false.
- preemptible Boolean
- Specifies if the instance is preemptible. Defaults to false.
- preemptible boolean
- Specifies if the instance is preemptible. Defaults to false.
- preemptible bool
- Specifies if the instance is preemptible. Defaults to false.
- preemptible Boolean
- Specifies if the instance is preemptible. Defaults to false.
ComputeInstanceSecondaryDisk, ComputeInstanceSecondaryDiskArgs
- Disk
Id string - ID of the disk that is attached to the instance.
- Auto
Delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- Device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - Mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- Disk
Id string - ID of the disk that is attached to the instance.
- Auto
Delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- Device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - Mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- disk
Id String - ID of the disk that is attached to the instance.
- auto
Delete Boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name String - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - mode String
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- disk
Id string - ID of the disk that is attached to the instance.
- auto
Delete boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name string - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - mode string
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- disk_
id str - ID of the disk that is attached to the instance.
- auto_
delete bool - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device_
name str - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - mode str
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
- disk
Id String - ID of the disk that is attached to the instance.
- auto
Delete Boolean - Whether the disk is auto-deleted when the instance is deleted. The default value is false.
- device
Name String - Name that can be used to access an attached disk
under
/dev/disk/by-id/
. - mode String
- Type of access to the disk resource. By default, a disk is attached in
READ_WRITE
mode.
Import
Instances can be imported using the ID
of an instance, e.g.
$ pulumi import yandex:index/computeInstance:ComputeInstance default instance_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.