Flavor
Manages a V2 flavor resource within OpenStack.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var test_flavor = new OpenStack.Compute.Flavor("test-flavor", new OpenStack.Compute.FlavorArgs
{
Disk = 20,
ExtraSpecs =
{
{ "hw:cpu_policy", "CPU-POLICY" },
{ "hw:cpu_thread_policy", "CPU-THREAD-POLICY" },
},
Ram = 8096,
Vcpus = 2,
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
test_flavor = openstack.compute.Flavor("test-flavor",
disk="20",
extra_specs={
"hw:cpu_policy": "CPU-POLICY",
"hw:cpu_thread_policy": "CPU-THREAD-POLICY",
},
ram="8096",
vcpus="2")import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const test_flavor = new openstack.compute.Flavor("test-flavor", {
disk: 20,
extraSpecs: {
"hw:cpu_policy": "CPU-POLICY",
"hw:cpu_thread_policy": "CPU-THREAD-POLICY",
},
ram: 8096,
vcpus: 2,
});Create a Flavor Resource
new Flavor(name: string, args: FlavorArgs, opts?: CustomResourceOptions);def Flavor(resource_name, opts=None, disk=None, ephemeral=None, extra_specs=None, is_public=None, name=None, ram=None, region=None, rx_tx_factor=None, swap=None, vcpus=None, __props__=None);func NewFlavor(ctx *Context, name string, args FlavorArgs, opts ...ResourceOption) (*Flavor, error)public Flavor(string name, FlavorArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FlavorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FlavorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FlavorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Flavor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Flavor resource accepts the following input properties:
- Disk int
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- Ram int
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- Vcpus int
The number of virtual CPUs to use. Changing this creates a new flavor.
- Ephemeral int
- Extra
Specs Dictionary<string, object> Key/Value pairs of metadata for the flavor.
- Is
Public bool Whether the flavor is public. Changing this creates a new flavor.
- Name string
A unique name for the flavor. Changing this creates a new flavor.
- Region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- Rx
Tx doubleFactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- Swap int
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- Disk int
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- Ram int
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- Vcpus int
The number of virtual CPUs to use. Changing this creates a new flavor.
- Ephemeral int
- Extra
Specs map[string]interface{} Key/Value pairs of metadata for the flavor.
- Is
Public bool Whether the flavor is public. Changing this creates a new flavor.
- Name string
A unique name for the flavor. Changing this creates a new flavor.
- Region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- Rx
Tx float64Factor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- Swap int
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- disk number
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- ram number
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- vcpus number
The number of virtual CPUs to use. Changing this creates a new flavor.
- ephemeral number
- extra
Specs {[key: string]: any} Key/Value pairs of metadata for the flavor.
- is
Public boolean Whether the flavor is public. Changing this creates a new flavor.
- name string
A unique name for the flavor. Changing this creates a new flavor.
- region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- rx
Tx numberFactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- swap number
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- disk float
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- ram float
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- vcpus float
The number of virtual CPUs to use. Changing this creates a new flavor.
- ephemeral float
- extra_
specs Dict[str, Any] Key/Value pairs of metadata for the flavor.
- is_
public bool Whether the flavor is public. Changing this creates a new flavor.
- name str
A unique name for the flavor. Changing this creates a new flavor.
- region str
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- rx_
tx_ floatfactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- swap float
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
Outputs
All input properties are implicitly available as output properties. Additionally, the Flavor resource produces the following output properties:
Look up an Existing Flavor Resource
Get an existing Flavor 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?: FlavorState, opts?: CustomResourceOptions): Flavorstatic get(resource_name, id, opts=None, disk=None, ephemeral=None, extra_specs=None, is_public=None, name=None, ram=None, region=None, rx_tx_factor=None, swap=None, vcpus=None, __props__=None);func GetFlavor(ctx *Context, name string, id IDInput, state *FlavorState, opts ...ResourceOption) (*Flavor, error)public static Flavor Get(string name, Input<string> id, FlavorState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Disk int
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- Ephemeral int
- Extra
Specs Dictionary<string, object> Key/Value pairs of metadata for the flavor.
- Is
Public bool Whether the flavor is public. Changing this creates a new flavor.
- Name string
A unique name for the flavor. Changing this creates a new flavor.
- Ram int
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- Region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- Rx
Tx doubleFactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- Swap int
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- Vcpus int
The number of virtual CPUs to use. Changing this creates a new flavor.
- Disk int
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- Ephemeral int
- Extra
Specs map[string]interface{} Key/Value pairs of metadata for the flavor.
- Is
Public bool Whether the flavor is public. Changing this creates a new flavor.
- Name string
A unique name for the flavor. Changing this creates a new flavor.
- Ram int
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- Region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- Rx
Tx float64Factor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- Swap int
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- Vcpus int
The number of virtual CPUs to use. Changing this creates a new flavor.
- disk number
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- ephemeral number
- extra
Specs {[key: string]: any} Key/Value pairs of metadata for the flavor.
- is
Public boolean Whether the flavor is public. Changing this creates a new flavor.
- name string
A unique name for the flavor. Changing this creates a new flavor.
- ram number
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- region string
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- rx
Tx numberFactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- swap number
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- vcpus number
The number of virtual CPUs to use. Changing this creates a new flavor.
- disk float
The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
- ephemeral float
- extra_
specs Dict[str, Any] Key/Value pairs of metadata for the flavor.
- is_
public bool Whether the flavor is public. Changing this creates a new flavor.
- name str
A unique name for the flavor. Changing this creates a new flavor.
- ram float
The amount of RAM to use, in megabytes. Changing this creates a new flavor.
- region str
The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor.- rx_
tx_ floatfactor RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
- swap float
The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
- vcpus float
The number of virtual CPUs to use. Changing this creates a new flavor.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.