openstack_compute_flavor_v2
This instruction is an adapted copy of the official OpenStack Terraform provider documentation in the Terraform Registry. Look at the restrictions for changing the resource openstack_compute_flavor_v2.
Manages a V2 flavor resource within OpenStack.
Example Usage
resource "openstack_compute_flavor_v2" "test-flavor" {
name = "my-flavor"
ram = "8096"
vcpus = "2"
disk = "20"
}
Argument Reference
The following arguments are supported:
-
region
— (Optional) 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, theregion
argument of the provider is used. Changing this creates a new flavor. -
name
— (Required) A unique name for the flavor. Changing this creates a new flavor. -
description
— (Optional) The description of the flavor. Changing this updates the description of the flavor. Requires microversion >= 2.55. -
ram
— (Required) The amount of RAM to use, in megabytes. Changing this creates a new flavor. -
flavor_id
— (Optional) Unique ID (string or UUID) of flavor to create. Changing this creates a new flavor. -
vcpus
— (Required) The number of virtual CPUs to use. Changing this creates a new flavor. -
disk
— (Required) The amount of disk space in GiB to use for the root (/) partition. Changing this creates a new flavor. -
ephemeral
— (Optional) The amount of ephemeral in GiB. If unspecified, the default is 0. Changing this creates a new flavor. Applicable only to Private Clouds. -
swap
— (Optional) The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor. Applicable only to Private Clouds. -
rx_tx_factor
— (Optional) RX/TX bandwith factor. The default is 1. Changing this creates a new flavor. -
is_public
— (Optional) Whether the flavor is public. Changing this creates a new flavor. Applicable only to Private Clouds. -
extra_specs
— (Optional) Key/Value pairs of metadata for the flavor. Applicable only to Private Clouds.
Attributes Reference
The following attributes are exported:
region
— See Argument Reference above.name
— See Argument Reference above.description
— See Argument Reference above.ram
— See Argument Reference above.vcpus
— See Argument Reference above.disk
— See Argument Reference above.ephemeral
— See Argument Reference above.swap
— See Argument Reference above.rx_tx_factor
— See Argument Reference above.is_public
— See Argument Reference above.extra_specs
— See Argument Reference above.
Import
Flavors can be imported using the ID
, e.g.
$ terraform import openstack_compute_flavor_v2.my-flavor 4142e64b-1b35-44a0-9b1e-5affc7af1106