vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getComputeFlavor
Explore with Pulumi AI
Use this data source to get the ID of an available VKCS flavor.
Example Usage
Filter by name
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const basic = vkcs.getComputeFlavor({
name: "Standard-2-8-50",
});
import pulumi
import pulumi_vkcs as vkcs
basic = vkcs.get_compute_flavor(name="Standard-2-8-50")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.GetComputeFlavor(ctx, &vkcs.GetComputeFlavorArgs{
Name: pulumi.StringRef("Standard-2-8-50"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var basic = Vkcs.GetComputeFlavor.Invoke(new()
{
Name = "Standard-2-8-50",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetComputeFlavorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var basic = VkcsFunctions.getComputeFlavor(GetComputeFlavorArgs.builder()
.name("Standard-2-8-50")
.build());
}
}
variables:
basic:
fn::invoke:
function: vkcs:getComputeFlavor
arguments:
name: Standard-2-8-50
Filter by number of vCPUs, RAM and CPU generation
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const basic = vkcs.getComputeFlavor({
vcpus: 1,
ram: 1024,
extraSpecs: {
"mcs:cpu_generation": "cascadelake-v1",
},
});
import pulumi
import pulumi_vkcs as vkcs
basic = vkcs.get_compute_flavor(vcpus=1,
ram=1024,
extra_specs={
"mcs:cpu_generation": "cascadelake-v1",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.GetComputeFlavor(ctx, &vkcs.GetComputeFlavorArgs{
Vcpus: pulumi.Float64Ref(1),
Ram: pulumi.Float64Ref(1024),
ExtraSpecs: map[string]interface{}{
"mcs:cpu_generation": "cascadelake-v1",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var basic = Vkcs.GetComputeFlavor.Invoke(new()
{
Vcpus = 1,
Ram = 1024,
ExtraSpecs =
{
{ "mcs:cpu_generation", "cascadelake-v1" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetComputeFlavorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var basic = VkcsFunctions.getComputeFlavor(GetComputeFlavorArgs.builder()
.vcpus(1)
.ram(1024)
.extraSpecs(Map.of("mcs:cpu_generation", "cascadelake-v1"))
.build());
}
}
variables:
basic:
fn::invoke:
function: vkcs:getComputeFlavor
arguments:
vcpus: 1
ram: 1024
extraSpecs:
mcs:cpu_generation: cascadelake-v1
Filter by number of vCPUs and minimum RAM
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const standard4Min6gb = vkcs.getComputeFlavor({
minRam: 6000,
vcpus: 4,
});
import pulumi
import pulumi_vkcs as vkcs
standard4_min6gb = vkcs.get_compute_flavor(min_ram=6000,
vcpus=4)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.GetComputeFlavor(ctx, &vkcs.GetComputeFlavorArgs{
MinRam: pulumi.Float64Ref(6000),
Vcpus: pulumi.Float64Ref(4),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var standard4Min6gb = Vkcs.GetComputeFlavor.Invoke(new()
{
MinRam = 6000,
Vcpus = 4,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetComputeFlavorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var standard4Min6gb = VkcsFunctions.getComputeFlavor(GetComputeFlavorArgs.builder()
.minRam(6000)
.vcpus(4)
.build());
}
}
variables:
standard4Min6gb:
fn::invoke:
function: vkcs:getComputeFlavor
arguments:
minRam: 6000
vcpus: 4
Using getComputeFlavor
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getComputeFlavor(args: GetComputeFlavorArgs, opts?: InvokeOptions): Promise<GetComputeFlavorResult>
function getComputeFlavorOutput(args: GetComputeFlavorOutputArgs, opts?: InvokeOptions): Output<GetComputeFlavorResult>
def get_compute_flavor(disk: Optional[float] = None,
extra_specs: Optional[Mapping[str, str]] = None,
flavor_id: Optional[str] = None,
is_public: Optional[bool] = None,
min_disk: Optional[float] = None,
min_ram: Optional[float] = None,
name: Optional[str] = None,
ram: Optional[float] = None,
region: Optional[str] = None,
rx_tx_factor: Optional[float] = None,
swap: Optional[float] = None,
vcpus: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeFlavorResult
def get_compute_flavor_output(disk: Optional[pulumi.Input[float]] = None,
extra_specs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
flavor_id: Optional[pulumi.Input[str]] = None,
is_public: Optional[pulumi.Input[bool]] = None,
min_disk: Optional[pulumi.Input[float]] = None,
min_ram: Optional[pulumi.Input[float]] = None,
name: Optional[pulumi.Input[str]] = None,
ram: Optional[pulumi.Input[float]] = None,
region: Optional[pulumi.Input[str]] = None,
rx_tx_factor: Optional[pulumi.Input[float]] = None,
swap: Optional[pulumi.Input[float]] = None,
vcpus: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeFlavorResult]
func GetComputeFlavor(ctx *Context, args *GetComputeFlavorArgs, opts ...InvokeOption) (*GetComputeFlavorResult, error)
func GetComputeFlavorOutput(ctx *Context, args *GetComputeFlavorOutputArgs, opts ...InvokeOption) GetComputeFlavorResultOutput
> Note: This function is named GetComputeFlavor
in the Go SDK.
public static class GetComputeFlavor
{
public static Task<GetComputeFlavorResult> InvokeAsync(GetComputeFlavorArgs args, InvokeOptions? opts = null)
public static Output<GetComputeFlavorResult> Invoke(GetComputeFlavorInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetComputeFlavorResult> getComputeFlavor(GetComputeFlavorArgs args, InvokeOptions options)
public static Output<GetComputeFlavorResult> getComputeFlavor(GetComputeFlavorArgs args, InvokeOptions options)
fn::invoke:
function: vkcs:index/getComputeFlavor:getComputeFlavor
arguments:
# arguments dictionary
The following arguments are supported:
- Disk double
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- Extra
Specs Dictionary<string, string> - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- Flavor
Id string - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- Is
Public bool - optional boolean → The flavor visibility.
- Min
Disk double - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - Min
Ram double - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - Name string
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - Ram double
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- Region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - Rx
Tx doubleFactor - optional number → The
rx_tx_factor
of the flavor. - Swap double
- optional number → The amount of swap (in gigabytes).
- Vcpus double
- optional number → The amount of VCPUs.
- Disk float64
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- Extra
Specs map[string]string - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- Flavor
Id string - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- Is
Public bool - optional boolean → The flavor visibility.
- Min
Disk float64 - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - Min
Ram float64 - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - Name string
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - Ram float64
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- Region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - Rx
Tx float64Factor - optional number → The
rx_tx_factor
of the flavor. - Swap float64
- optional number → The amount of swap (in gigabytes).
- Vcpus float64
- optional number → The amount of VCPUs.
- disk Double
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- extra
Specs Map<String,String> - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- flavor
Id String - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- is
Public Boolean - optional boolean → The flavor visibility.
- min
Disk Double - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - min
Ram Double - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - name String
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - ram Double
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- region String
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - rx
Tx DoubleFactor - optional number → The
rx_tx_factor
of the flavor. - swap Double
- optional number → The amount of swap (in gigabytes).
- vcpus Double
- optional number → The amount of VCPUs.
- disk number
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- extra
Specs {[key: string]: string} - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- flavor
Id string - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- is
Public boolean - optional boolean → The flavor visibility.
- min
Disk number - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - min
Ram number - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - name string
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - ram number
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - rx
Tx numberFactor - optional number → The
rx_tx_factor
of the flavor. - swap number
- optional number → The amount of swap (in gigabytes).
- vcpus number
- optional number → The amount of VCPUs.
- disk float
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- extra_
specs Mapping[str, str] - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- flavor_
id str - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- is_
public bool - optional boolean → The flavor visibility.
- min_
disk float - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - min_
ram float - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - name str
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - ram float
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- region str
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - rx_
tx_ floatfactor - optional number → The
rx_tx_factor
of the flavor. - swap float
- optional number → The amount of swap (in gigabytes).
- vcpus float
- optional number → The amount of VCPUs.
- disk Number
- optional number → The exact amount of disk (in gigabytes). Don't set disk, when min_disk is set.
- extra
Specs Map<String> - optional map of string → Key/Value pairs of metadata for the flavor. Be careful when using it, there is no validation applied to this field. When searching for a suitable flavor, it checks all required extra specs in a flavor metadata. See https://cloud.vk.com/docs/base/iaas/concepts/vm-concept
- flavor
Id String - optional string → The ID of the flavor. Conflicts with the
name
,min_ram
andmin_disk
- is
Public Boolean - optional boolean → The flavor visibility.
- min
Disk Number - optional number → The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id
. - min
Ram Number - optional number → The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id
. - name String
- optional string → The name of the flavor. Conflicts with the
flavor_id
. - ram Number
- optional number → The exact amount of RAM (in megabytes). Don't set ram, when min_ram is set.
- region String
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - rx
Tx NumberFactor - optional number → The
rx_tx_factor
of the flavor. - swap Number
- optional number → The amount of swap (in gigabytes).
- vcpus Number
- optional number → The amount of VCPUs.
getComputeFlavor Result
The following output properties are available:
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.