1. Packages
  2. Yandex
  3. API Docs
  4. ComputeInstance
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

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",
        });
    }

}
Copy
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
	})
}
Copy

Coming soon!

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",
});
Copy
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")
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. ComputeInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ComputeInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ComputeInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
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());
Copy
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")
Copy
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",
});
Copy
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
Copy

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:

BootDisk This property is required. ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
NetworkInterfaces This property is required. List<ComputeInstanceNetworkInterface>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
Resources This property is required. ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
AllowStoppingForUpdate bool
Description string
Description of the boot disk.
FolderId 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 to id of the instance and fqdn 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.
NetworkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
PlacementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
PlatformId string
The type of virtual machine to create. The default is 'standard-v1'.
SchedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
SecondaryDisks List<ComputeInstanceSecondaryDisk>
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.
ServiceAccountId string
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.
BootDisk This property is required. ComputeInstanceBootDiskArgs
The boot disk for the instance. The structure is documented below.
NetworkInterfaces This property is required. []ComputeInstanceNetworkInterfaceArgs
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
Resources This property is required. ComputeInstanceResourcesArgs
Compute resources that are allocated for the instance. The structure is documented below.
AllowStoppingForUpdate bool
Description string
Description of the boot disk.
FolderId 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 to id of the instance and fqdn 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.
NetworkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
PlacementPolicy ComputeInstancePlacementPolicyArgs
The placement policy configuration. The structure is documented below.
PlatformId string
The type of virtual machine to create. The default is 'standard-v1'.
SchedulingPolicy ComputeInstanceSchedulingPolicyArgs
Scheduling policy configuration. The structure is documented below.
SecondaryDisks []ComputeInstanceSecondaryDiskArgs
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.
ServiceAccountId string
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.
bootDisk This property is required. ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
networkInterfaces This property is required. List<ComputeInstanceNetworkInterface>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
resources This property is required. ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
allowStoppingForUpdate Boolean
description String
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType String
Type of network acceleration. The default is standard. Values: standard, software_accelerated
placementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
platformId String
The type of virtual machine to create. The default is 'standard-v1'.
schedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
secondaryDisks List<ComputeInstanceSecondaryDisk>
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.
serviceAccountId String
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.
bootDisk This property is required. ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
networkInterfaces This property is required. ComputeInstanceNetworkInterface[]
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
resources This property is required. ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
allowStoppingForUpdate boolean
description string
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
placementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
platformId string
The type of virtual machine to create. The default is 'standard-v1'.
schedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
secondaryDisks ComputeInstanceSecondaryDisk[]
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.
serviceAccountId string
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 This property is required. ComputeInstanceBootDiskArgs
The boot disk for the instance. The structure is documented below.
network_interfaces This property is required. Sequence[ComputeInstanceNetworkInterfaceArgs]
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
resources This property is required. ComputeInstanceResourcesArgs
Compute resources that are allocated for the instance. The structure is documented below.
allow_stopping_for_update bool
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 to id of the instance and fqdn 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_type str
Type of network acceleration. The default is standard. Values: standard, software_accelerated
placement_policy ComputeInstancePlacementPolicyArgs
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 ComputeInstanceSchedulingPolicyArgs
Scheduling policy configuration. The structure is documented below.
secondary_disks Sequence[ComputeInstanceSecondaryDiskArgs]
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_id str
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.
bootDisk This property is required. Property Map
The boot disk for the instance. The structure is documented below.
networkInterfaces This property is required. List<Property Map>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
resources This property is required. Property Map
Compute resources that are allocated for the instance. The structure is documented below.
allowStoppingForUpdate Boolean
description String
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType String
Type of network acceleration. The default is standard. Values: standard, software_accelerated
placementPolicy Property Map
The placement policy configuration. The structure is documented below.
platformId String
The type of virtual machine to create. The default is 'standard-v1'.
schedulingPolicy Property Map
Scheduling policy configuration. The structure is documented below.
secondaryDisks 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.
serviceAccountId String
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:

CreatedAt string
Creation timestamp of the instance.
Fqdn string
DNS record FQDN (must have a dot at the end).
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of this instance.
CreatedAt string
Creation timestamp of the instance.
Fqdn string
DNS record FQDN (must have a dot at the end).
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of this instance.
createdAt String
Creation timestamp of the instance.
fqdn String
DNS record FQDN (must have a dot at the end).
id String
The provider-assigned unique ID for this managed resource.
status String
The status of this instance.
createdAt string
Creation timestamp of the instance.
fqdn string
DNS record FQDN (must have a dot at the end).
id string
The provider-assigned unique ID for this managed resource.
status string
The status of this instance.
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.
createdAt String
Creation timestamp of the instance.
fqdn String
DNS record FQDN (must have a dot at the end).
id String
The provider-assigned unique ID for this managed resource.
status String
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)
resources:  _:    type: yandex:ComputeInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AllowStoppingForUpdate bool
BootDisk ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
CreatedAt string
Creation timestamp of the instance.
Description string
Description of the boot disk.
FolderId 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 to id of the instance and fqdn 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.
NetworkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
NetworkInterfaces List<ComputeInstanceNetworkInterface>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
PlacementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
PlatformId string
The type of virtual machine to create. The default is 'standard-v1'.
Resources ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
SchedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
SecondaryDisks List<ComputeInstanceSecondaryDisk>
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.
ServiceAccountId string
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.
AllowStoppingForUpdate bool
BootDisk ComputeInstanceBootDiskArgs
The boot disk for the instance. The structure is documented below.
CreatedAt string
Creation timestamp of the instance.
Description string
Description of the boot disk.
FolderId 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 to id of the instance and fqdn 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.
NetworkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
NetworkInterfaces []ComputeInstanceNetworkInterfaceArgs
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
PlacementPolicy ComputeInstancePlacementPolicyArgs
The placement policy configuration. The structure is documented below.
PlatformId string
The type of virtual machine to create. The default is 'standard-v1'.
Resources ComputeInstanceResourcesArgs
Compute resources that are allocated for the instance. The structure is documented below.
SchedulingPolicy ComputeInstanceSchedulingPolicyArgs
Scheduling policy configuration. The structure is documented below.
SecondaryDisks []ComputeInstanceSecondaryDiskArgs
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.
ServiceAccountId string
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.
allowStoppingForUpdate Boolean
bootDisk ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
createdAt String
Creation timestamp of the instance.
description String
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType String
Type of network acceleration. The default is standard. Values: standard, software_accelerated
networkInterfaces List<ComputeInstanceNetworkInterface>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
placementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
platformId String
The type of virtual machine to create. The default is 'standard-v1'.
resources ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
schedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
secondaryDisks List<ComputeInstanceSecondaryDisk>
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.
serviceAccountId String
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.
allowStoppingForUpdate boolean
bootDisk ComputeInstanceBootDisk
The boot disk for the instance. The structure is documented below.
createdAt string
Creation timestamp of the instance.
description string
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType string
Type of network acceleration. The default is standard. Values: standard, software_accelerated
networkInterfaces ComputeInstanceNetworkInterface[]
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
placementPolicy ComputeInstancePlacementPolicy
The placement policy configuration. The structure is documented below.
platformId string
The type of virtual machine to create. The default is 'standard-v1'.
resources ComputeInstanceResources
Compute resources that are allocated for the instance. The structure is documented below.
schedulingPolicy ComputeInstanceSchedulingPolicy
Scheduling policy configuration. The structure is documented below.
secondaryDisks ComputeInstanceSecondaryDisk[]
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.
serviceAccountId string
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_for_update bool
boot_disk ComputeInstanceBootDiskArgs
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 to id of the instance and fqdn 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_type str
Type of network acceleration. The default is standard. Values: standard, software_accelerated
network_interfaces Sequence[ComputeInstanceNetworkInterfaceArgs]
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
placement_policy ComputeInstancePlacementPolicyArgs
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 ComputeInstanceResourcesArgs
Compute resources that are allocated for the instance. The structure is documented below.
scheduling_policy ComputeInstanceSchedulingPolicyArgs
Scheduling policy configuration. The structure is documented below.
secondary_disks Sequence[ComputeInstanceSecondaryDiskArgs]
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_id str
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.
allowStoppingForUpdate Boolean
bootDisk Property Map
The boot disk for the instance. The structure is documented below.
createdAt String
Creation timestamp of the instance.
description String
Description of the boot disk.
folderId 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 to id of the instance and fqdn 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.
networkAccelerationType String
Type of network acceleration. The default is standard. Values: standard, software_accelerated
networkInterfaces List<Property Map>
Networks to attach to the instance. This can be specified multiple times. The structure is documented below.
placementPolicy Property Map
The placement policy configuration. The structure is documented below.
platformId 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.
schedulingPolicy Property Map
Scheduling policy configuration. The structure is documented below.
secondaryDisks 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.
serviceAccountId String
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

AutoDelete bool
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
DeviceName string
Name that can be used to access an attached disk under /dev/disk/by-id/.
DiskId string
ID of the disk that is attached to the instance.
InitializeParams ComputeInstanceBootDiskInitializeParams
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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.
AutoDelete bool
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
DeviceName string
Name that can be used to access an attached disk under /dev/disk/by-id/.
DiskId string
ID of the disk that is attached to the instance.
InitializeParams ComputeInstanceBootDiskInitializeParams
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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.
autoDelete Boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName String
Name that can be used to access an attached disk under /dev/disk/by-id/.
diskId String
ID of the disk that is attached to the instance.
initializeParams ComputeInstanceBootDiskInitializeParams
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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.
autoDelete boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName string
Name that can be used to access an attached disk under /dev/disk/by-id/.
diskId string
ID of the disk that is attached to the instance.
initializeParams ComputeInstanceBootDiskInitializeParams
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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 ComputeInstanceBootDiskInitializeParams
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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.
autoDelete Boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName String
Name that can be used to access an attached disk under /dev/disk/by-id/.
diskId String
ID of the disk that is attached to the instance.
initializeParams Property Map
Parameters for a new disk that will be created alongside the new instance. Either initialize_params or disk_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

BlockSize int
Description string
Description of the boot disk.
ImageId string
A disk image to initialize this disk from.
Name string
Name of the boot disk.
Size int
Size of the disk in GB.
SnapshotId string
A snapshot to initialize this disk from.
Type string
Disk type.
BlockSize int
Description string
Description of the boot disk.
ImageId string
A disk image to initialize this disk from.
Name string
Name of the boot disk.
Size int
Size of the disk in GB.
SnapshotId string
A snapshot to initialize this disk from.
Type string
Disk type.
blockSize Integer
description String
Description of the boot disk.
imageId String
A disk image to initialize this disk from.
name String
Name of the boot disk.
size Integer
Size of the disk in GB.
snapshotId String
A snapshot to initialize this disk from.
type String
Disk type.
blockSize number
description string
Description of the boot disk.
imageId string
A disk image to initialize this disk from.
name string
Name of the boot disk.
size number
Size of the disk in GB.
snapshotId 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.
blockSize Number
description String
Description of the boot disk.
imageId String
A disk image to initialize this disk from.
name String
Name of the boot disk.
size Number
Size of the disk in GB.
snapshotId String
A snapshot to initialize this disk from.
type String
Disk type.

ComputeInstanceNetworkInterface
, ComputeInstanceNetworkInterfaceArgs

SubnetId This property is required. string
ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
DnsRecords List<ComputeInstanceNetworkInterfaceDnsRecord>
List of configurations for creating ipv4 DNS records. The structure is documented below.
Index int
IpAddress 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.
Ipv6DnsRecords List<ComputeInstanceNetworkInterfaceIpv6DnsRecord>
List of configurations for creating ipv6 DNS records. The structure is documented below.
MacAddress string
Nat bool
Provide a public address, for instance, to access the internet over NAT.
NatDnsRecords List<ComputeInstanceNetworkInterfaceNatDnsRecord>
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
NatIpAddress string
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
NatIpVersion string
SecurityGroupIds List<string>
Security group ids for network interface.
SubnetId This property is required. string
ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
DnsRecords []ComputeInstanceNetworkInterfaceDnsRecord
List of configurations for creating ipv4 DNS records. The structure is documented below.
Index int
IpAddress 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.
Ipv6DnsRecords []ComputeInstanceNetworkInterfaceIpv6DnsRecord
List of configurations for creating ipv6 DNS records. The structure is documented below.
MacAddress string
Nat bool
Provide a public address, for instance, to access the internet over NAT.
NatDnsRecords []ComputeInstanceNetworkInterfaceNatDnsRecord
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
NatIpAddress string
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
NatIpVersion string
SecurityGroupIds []string
Security group ids for network interface.
subnetId This property is required. String
ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
dnsRecords List<ComputeInstanceNetworkInterfaceDnsRecord>
List of configurations for creating ipv4 DNS records. The structure is documented below.
index Integer
ipAddress 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.
ipv6DnsRecords List<ComputeInstanceNetworkInterfaceIpv6DnsRecord>
List of configurations for creating ipv6 DNS records. The structure is documented below.
macAddress String
nat Boolean
Provide a public address, for instance, to access the internet over NAT.
natDnsRecords List<ComputeInstanceNetworkInterfaceNatDnsRecord>
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
natIpAddress String
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
natIpVersion String
securityGroupIds List<String>
Security group ids for network interface.
subnetId This property is required. string
ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
dnsRecords ComputeInstanceNetworkInterfaceDnsRecord[]
List of configurations for creating ipv4 DNS records. The structure is documented below.
index number
ipAddress 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.
ipv6DnsRecords ComputeInstanceNetworkInterfaceIpv6DnsRecord[]
List of configurations for creating ipv6 DNS records. The structure is documented below.
macAddress string
nat boolean
Provide a public address, for instance, to access the internet over NAT.
natDnsRecords ComputeInstanceNetworkInterfaceNatDnsRecord[]
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
natIpAddress string
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
natIpVersion string
securityGroupIds string[]
Security group ids for network interface.
subnet_id This property is required. 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[ComputeInstanceNetworkInterfaceDnsRecord]
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_records Sequence[ComputeInstanceNetworkInterfaceIpv6DnsRecord]
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_records Sequence[ComputeInstanceNetworkInterfaceNatDnsRecord]
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
nat_ip_address str
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
nat_ip_version str
security_group_ids Sequence[str]
Security group ids for network interface.
subnetId This property is required. String
ID of the subnet to attach this interface to. The subnet must exist in the same zone where this instance will be created.
dnsRecords List<Property Map>
List of configurations for creating ipv4 DNS records. The structure is documented below.
index Number
ipAddress 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.
ipv6DnsRecords List<Property Map>
List of configurations for creating ipv6 DNS records. The structure is documented below.
macAddress String
nat Boolean
Provide a public address, for instance, to access the internet over NAT.
natDnsRecords List<Property Map>
List of configurations for creating ipv4 NAT DNS records. The structure is documented below.
natIpAddress String
Provide a public address, for instance, to access the internet over NAT. Address should be already reserved in web UI.
natIpVersion String
securityGroupIds List<String>
Security group ids for network interface.

ComputeInstanceNetworkInterfaceDnsRecord
, ComputeInstanceNetworkInterfaceDnsRecordArgs

Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Integer
DNS record TTL. in seconds
fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
dnsZoneId string
DNS zone ID (if not set, private zone used).
ptr boolean
When set to true, also create a PTR DNS record.
ttl number
DNS record TTL. in seconds
fqdn This property is required. str
DNS record FQDN (must have a dot at the end).
dns_zone_id str
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Number
DNS record TTL. in seconds

ComputeInstanceNetworkInterfaceIpv6DnsRecord
, ComputeInstanceNetworkInterfaceIpv6DnsRecordArgs

Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Integer
DNS record TTL. in seconds
fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
dnsZoneId string
DNS zone ID (if not set, private zone used).
ptr boolean
When set to true, also create a PTR DNS record.
ttl number
DNS record TTL. in seconds
fqdn This property is required. str
DNS record FQDN (must have a dot at the end).
dns_zone_id str
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Number
DNS record TTL. in seconds

ComputeInstanceNetworkInterfaceNatDnsRecord
, ComputeInstanceNetworkInterfaceNatDnsRecordArgs

Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
Fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
DnsZoneId string
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Integer
DNS record TTL. in seconds
fqdn This property is required. string
DNS record FQDN (must have a dot at the end).
dnsZoneId string
DNS zone ID (if not set, private zone used).
ptr boolean
When set to true, also create a PTR DNS record.
ttl number
DNS record TTL. in seconds
fqdn This property is required. str
DNS record FQDN (must have a dot at the end).
dns_zone_id str
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
fqdn This property is required. String
DNS record FQDN (must have a dot at the end).
dnsZoneId String
DNS zone ID (if not set, private zone used).
ptr Boolean
When set to true, also create a PTR DNS record.
ttl Number
DNS record TTL. in seconds

ComputeInstancePlacementPolicy
, ComputeInstancePlacementPolicyArgs

PlacementGroupId This property is required. string
Specifies the id of the Placement Group to assign to the instance.
PlacementGroupId This property is required. string
Specifies the id of the Placement Group to assign to the instance.
placementGroupId This property is required. String
Specifies the id of the Placement Group to assign to the instance.
placementGroupId This property is required. string
Specifies the id of the Placement Group to assign to the instance.
placement_group_id This property is required. str
Specifies the id of the Placement Group to assign to the instance.
placementGroupId This property is required. String
Specifies the id of the Placement Group to assign to the instance.

ComputeInstanceResources
, ComputeInstanceResourcesArgs

Cores This property is required. int
CPU cores for the instance.
Memory This property is required. double
Memory size in GB.
CoreFraction int
If provided, specifies baseline performance for a core as a percent.
Gpus int
Cores This property is required. int
CPU cores for the instance.
Memory This property is required. float64
Memory size in GB.
CoreFraction int
If provided, specifies baseline performance for a core as a percent.
Gpus int
cores This property is required. Integer
CPU cores for the instance.
memory This property is required. Double
Memory size in GB.
coreFraction Integer
If provided, specifies baseline performance for a core as a percent.
gpus Integer
cores This property is required. number
CPU cores for the instance.
memory This property is required. number
Memory size in GB.
coreFraction number
If provided, specifies baseline performance for a core as a percent.
gpus number
cores This property is required. int
CPU cores for the instance.
memory This property is required. float
Memory size in GB.
core_fraction int
If provided, specifies baseline performance for a core as a percent.
gpus int
cores This property is required. Number
CPU cores for the instance.
memory This property is required. Number
Memory size in GB.
coreFraction 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

DiskId This property is required. string
ID of the disk that is attached to the instance.
AutoDelete bool
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
DeviceName 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.
DiskId This property is required. string
ID of the disk that is attached to the instance.
AutoDelete bool
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
DeviceName 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.
diskId This property is required. String
ID of the disk that is attached to the instance.
autoDelete Boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName 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.
diskId This property is required. string
ID of the disk that is attached to the instance.
autoDelete boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName 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 This property is required. 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.
diskId This property is required. String
ID of the disk that is attached to the instance.
autoDelete Boolean
Whether the disk is auto-deleted when the instance is deleted. The default value is false.
deviceName 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
Copy

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.