GetFlavor
Use this data source to get the ID of an available OpenStack flavor.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var small = Output.Create(OpenStack.Compute.GetFlavor.InvokeAsync(new OpenStack.Compute.GetFlavorArgs
{
Ram = 512,
Vcpus = 1,
}));
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
small = openstack.compute.get_flavor(ram=512,
vcpus=1)import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const small = pulumi.output(openstack.compute.getFlavor({
ram: 512,
vcpus: 1,
}, { async: true }));Using GetFlavor
function getFlavor(args: GetFlavorArgs, opts?: InvokeOptions): Promise<GetFlavorResult>function get_flavor(disk=None, flavor_id=None, is_public=None, min_disk=None, min_ram=None, name=None, ram=None, region=None, rx_tx_factor=None, swap=None, vcpus=None, opts=None)func LookupFlavor(ctx *Context, args *LookupFlavorArgs, opts ...InvokeOption) (*LookupFlavorResult, error)Note: This function is named
LookupFlavorin the Go SDK.
public static class GetFlavor {
public static Task<GetFlavorResult> InvokeAsync(GetFlavorArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Disk int
The exact amount of disk (in gigabytes).
- Flavor
Id string The ID of the flavor. Conflicts with the
name,min_ramandmin_disk- Is
Public bool The flavor visibility.
- Min
Disk int The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id.- Min
Ram int The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id.- Name string
The name of the flavor. Conflicts with the
flavor_id.- Ram int
The exact amount of RAM (in megabytes).
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used.- Rx
Tx doubleFactor The
rx_tx_factorof the flavor.- Swap int
The amount of swap (in gigabytes).
- Vcpus int
The amount of VCPUs.
- Disk int
The exact amount of disk (in gigabytes).
- Flavor
Id string The ID of the flavor. Conflicts with the
name,min_ramandmin_disk- Is
Public bool The flavor visibility.
- Min
Disk int The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id.- Min
Ram int The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id.- Name string
The name of the flavor. Conflicts with the
flavor_id.- Ram int
The exact amount of RAM (in megabytes).
- Region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used.- Rx
Tx float64Factor The
rx_tx_factorof the flavor.- Swap int
The amount of swap (in gigabytes).
- Vcpus int
The amount of VCPUs.
- disk number
The exact amount of disk (in gigabytes).
- flavor
Id string The ID of the flavor. Conflicts with the
name,min_ramandmin_disk- is
Public boolean The flavor visibility.
- min
Disk number The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id.- min
Ram number The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id.- name string
The name of the flavor. Conflicts with the
flavor_id.- ram number
The exact amount of RAM (in megabytes).
- region string
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used.- rx
Tx numberFactor The
rx_tx_factorof the flavor.- swap number
The amount of swap (in gigabytes).
- vcpus number
The amount of VCPUs.
- disk float
The exact amount of disk (in gigabytes).
- flavor_
id str The ID of the flavor. Conflicts with the
name,min_ramandmin_disk- is_
public bool The flavor visibility.
- min_
disk float The minimum amount of disk (in gigabytes). Conflicts with the
flavor_id.- min_
ram float The minimum amount of RAM (in megabytes). Conflicts with the
flavor_id.- name str
The name of the flavor. Conflicts with the
flavor_id.- ram float
The exact amount of RAM (in megabytes).
- region str
The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used.- rx_
tx_ floatfactor The
rx_tx_factorof the flavor.- swap float
The amount of swap (in gigabytes).
- vcpus float
The amount of VCPUs.
GetFlavor Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.