compute

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-openstack repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-openstack repo.

class pulumi_openstack.compute.AwaitableGetAvailabilityZonesResult(names=None, region=None, state=None, id=None)
class pulumi_openstack.compute.AwaitableGetFlavorResult(disk=None, extra_specs=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, id=None)
class pulumi_openstack.compute.AwaitableGetKeypairResult(fingerprint=None, name=None, public_key=None, region=None, id=None)
class pulumi_openstack.compute.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, __name__=None, __opts__=None)

Manages a V2 flavor resource within OpenStack.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • disk (pulumi.Input[float]) – The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.

  • extra_specs (pulumi.Input[dict]) – Key/Value pairs of metadata for the flavor.

  • is_public (pulumi.Input[bool]) – Whether the flavor is public. Changing this creates a new flavor.

  • name (pulumi.Input[str]) – A unique name for the flavor. Changing this creates a new flavor.

  • ram (pulumi.Input[float]) – The amount of RAM to use, in megabytes. Changing this creates a new flavor.

  • region (pulumi.Input[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 region argument of the provider is used. Changing this creates a new flavor.

  • rx_tx_factor (pulumi.Input[float]) – RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.

  • swap (pulumi.Input[float]) – The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.

  • vcpus (pulumi.Input[float]) – The number of virtual CPUs to use. Changing this creates a new flavor.

disk = None

The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.

extra_specs = None

Key/Value pairs of metadata for the flavor.

is_public = None

Whether the flavor is public. Changing this creates a new flavor.

name = None

A unique name for the flavor. Changing this creates a new flavor.

ram = None

The amount of RAM to use, in megabytes. Changing this creates a new flavor.

region = None

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 region argument of the provider is used. Changing this creates a new flavor.

rx_tx_factor = None

RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.

swap = None

The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.

vcpus = None

The number of virtual CPUs to use. Changing this creates a new flavor.

static 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)

Get an existing Flavor resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • disk (pulumi.Input[float]) – The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.

  • extra_specs (pulumi.Input[dict]) – Key/Value pairs of metadata for the flavor.

  • is_public (pulumi.Input[bool]) – Whether the flavor is public. Changing this creates a new flavor.

  • name (pulumi.Input[str]) – A unique name for the flavor. Changing this creates a new flavor.

  • ram (pulumi.Input[float]) – The amount of RAM to use, in megabytes. Changing this creates a new flavor.

  • region (pulumi.Input[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 region argument of the provider is used. Changing this creates a new flavor.

  • rx_tx_factor (pulumi.Input[float]) – RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.

  • swap (pulumi.Input[float]) – The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.

  • vcpus (pulumi.Input[float]) – The number of virtual CPUs to use. Changing this creates a new flavor.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.FlavorAccess(resource_name, opts=None, flavor_id=None, region=None, tenant_id=None, __props__=None, __name__=None, __opts__=None)

Manages a project access for flavor V2 resource within OpenStack.

Note: You must have admin privileges in your OpenStack cloud to use this resource.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • flavor_id (pulumi.Input[str]) – The UUID of flavor to use. Changing this creates a new flavor access.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new flavor access.

  • tenant_id (pulumi.Input[str]) – The UUID of tenant which is allowed to use the flavor. Changing this creates a new flavor access.

flavor_id = None

The UUID of flavor to use. Changing this creates a new flavor access.

region = None

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new flavor access.

tenant_id = None

The UUID of tenant which is allowed to use the flavor. Changing this creates a new flavor access.

static get(resource_name, id, opts=None, flavor_id=None, region=None, tenant_id=None)

Get an existing FlavorAccess resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • flavor_id (pulumi.Input[str]) – The UUID of flavor to use. Changing this creates a new flavor access.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new flavor access.

  • tenant_id (pulumi.Input[str]) – The UUID of tenant which is allowed to use the flavor. Changing this creates a new flavor access.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.FloatingIp(resource_name, opts=None, pool=None, region=None, __props__=None, __name__=None, __opts__=None)

Manages a V2 floating IP resource within OpenStack Nova (compute) that can be used for compute instances.

Please note that managing floating IPs through the OpenStack Compute API has been deprecated. Unless you are using an older OpenStack environment, it is recommended to use the networking.FloatingIp resource instead, which uses the OpenStack Networking API.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • pool (pulumi.Input[str]) – The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).

address = None

The actual floating IP address itself.

fixed_ip = None

The fixed IP address corresponding to the floating IP.

instance_id = None

UUID of the compute instance associated with the floating IP.

pool = None

The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.

region = None

The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).

static get(resource_name, id, opts=None, address=None, fixed_ip=None, instance_id=None, pool=None, region=None)

Get an existing FloatingIp resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The actual floating IP address itself.

  • fixed_ip (pulumi.Input[str]) – The fixed IP address corresponding to the floating IP.

  • instance_id (pulumi.Input[str]) – UUID of the compute instance associated with the floating IP.

  • pool (pulumi.Input[str]) – The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.FloatingIpAssociate(resource_name, opts=None, fixed_ip=None, floating_ip=None, instance_id=None, region=None, wait_until_associated=None, __props__=None, __name__=None, __opts__=None)

Associate a floating IP to an instance. This can be used instead of the floating_ip options in compute.Instance.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fixed_ip (pulumi.Input[str]) – The specific IP address to direct traffic to.

  • floating_ip (pulumi.Input[str]) – The floating IP to associate.

  • instance_id (pulumi.Input[str]) – The instance to associte the floating IP with.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new floatingip_associate.

fixed_ip = None

The specific IP address to direct traffic to.

floating_ip = None

The floating IP to associate.

instance_id = None

The instance to associte the floating IP with.

region = None

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new floatingip_associate.

static get(resource_name, id, opts=None, fixed_ip=None, floating_ip=None, instance_id=None, region=None, wait_until_associated=None)

Get an existing FloatingIpAssociate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fixed_ip (pulumi.Input[str]) – The specific IP address to direct traffic to.

  • floating_ip (pulumi.Input[str]) – The floating IP to associate.

  • instance_id (pulumi.Input[str]) – The instance to associte the floating IP with.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new floatingip_associate.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.GetAvailabilityZonesResult(names=None, region=None, state=None, id=None)

A collection of values returned by getAvailabilityZones.

names = None

The names of the availability zones, ordered alphanumerically, that match the queried state

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_openstack.compute.GetFlavorResult(disk=None, extra_specs=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, id=None)

A collection of values returned by getFlavor.

extra_specs = None

Key/Value pairs of metadata for the flavor.

is_public = None

Whether the flavor is public or private.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_openstack.compute.GetKeypairResult(fingerprint=None, name=None, public_key=None, region=None, id=None)

A collection of values returned by getKeypair.

fingerprint = None

The fingerprint of the OpenSSH key.

name = None

See Argument Reference above.

public_key = None

The OpenSSH-formatted public key of the keypair.

region = None

See Argument Reference above.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_openstack.compute.Instance(resource_name, opts=None, access_ip_v4=None, access_ip_v6=None, admin_pass=None, availability_zone=None, block_devices=None, config_drive=None, flavor_id=None, flavor_name=None, force_delete=None, image_id=None, image_name=None, key_pair=None, metadata=None, name=None, networks=None, personalities=None, power_state=None, region=None, scheduler_hints=None, security_groups=None, stop_before_destroy=None, user_data=None, vendor_options=None, __props__=None, __name__=None, __opts__=None)

Manages a V2 VM instance resource within OpenStack.

Importing instances can be tricky, since the nova api does not offer all information provided at creation time for later retrieval. Network interface attachment order, and number and sizes of ephemeral disks are examples of this.

The importer cannot read the emphemeral disk configuration of an instance, so just specify image_id as in the configuration of the basic instance example.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • access_ip_v4 (pulumi.Input[str]) – The first detected Fixed IPv4 address.

  • access_ip_v6 (pulumi.Input[str]) – The first detected Fixed IPv6 address.

  • admin_pass (pulumi.Input[str]) – The administrative password to assign to the server. Changing this changes the root password on the existing server.

  • availability_zone (pulumi.Input[str]) – The availability zone in which to create the server. Changing this creates a new server.

  • block_devices (pulumi.Input[list]) – Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.

  • config_drive (pulumi.Input[bool]) – Whether to use the config_drive feature to configure the instance. Changing this creates a new server.

  • flavor_id (pulumi.Input[str]) – The flavor ID of the desired flavor for the server. Changing this resizes the existing server.

  • flavor_name (pulumi.Input[str]) – The name of the desired flavor for the server. Changing this resizes the existing server.

  • force_delete (pulumi.Input[bool]) – Whether to force the OpenStack instance to be forcefully deleted. This is useful for environments that have reclaim / soft deletion enabled.

  • image_id (pulumi.Input[str]) – (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.

  • image_name (pulumi.Input[str]) – (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.

  • key_pair (pulumi.Input[str]) – The name of a key pair to put on the server. The key pair must already be created and associated with the tenant’s account. Changing this creates a new server.

  • metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.

  • name (pulumi.Input[str]) – A unique name for the resource.

  • networks (pulumi.Input[list]) – An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.

  • personalities (pulumi.Input[list]) – Customize the personality of an instance by defining one or more files and their contents. The personality structure is described below.

  • power_state (pulumi.Input[str]) – Provide the VM state. Only ‘active’ and ‘shutoff’ are supported values. Note: If the initial power_state is the shutoff the VM will be stopped immediately after build and the provisioners like remote-exec or files are not supported.

  • region (pulumi.Input[str]) – The region in which to create the server instance. If omitted, the region argument of the provider is used. Changing this creates a new server.

  • scheduler_hints (pulumi.Input[list]) – Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.

  • security_groups (pulumi.Input[list]) – An array of one or more security group names or ids to associate with the server. Changing this results in adding/removing security groups from the existing server. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

  • stop_before_destroy (pulumi.Input[bool]) – Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn’t stop within timeout, it will be destroyed anyway.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Changing this creates a new server.

  • vendor_options (pulumi.Input[dict]) – Map of additional vendor-specific options. Supported options are described below.

The block_devices object supports the following:

  • bootIndex (pulumi.Input[float])

  • deleteOnTermination (pulumi.Input[bool])

  • destinationType (pulumi.Input[str])

  • deviceType (pulumi.Input[str])

  • diskBus (pulumi.Input[str])

  • guestFormat (pulumi.Input[str])

  • sourceType (pulumi.Input[str])

  • uuid (pulumi.Input[str])

  • volumeSize (pulumi.Input[float])

The networks object supports the following:

  • accessNetwork (pulumi.Input[bool])

  • fixedIpV4 (pulumi.Input[str])

  • fixedIpV6 (pulumi.Input[str])

  • mac (pulumi.Input[str])

  • name (pulumi.Input[str]) - A unique name for the resource.

  • port (pulumi.Input[str])

  • uuid (pulumi.Input[str])

The personalities object supports the following:

  • content (pulumi.Input[str])

  • file (pulumi.Input[str])

The scheduler_hints object supports the following:

  • additionalProperties (pulumi.Input[dict])

  • buildNearHostIp (pulumi.Input[str])

  • differentHosts (pulumi.Input[list])

  • group (pulumi.Input[str])

  • queries (pulumi.Input[list])

  • sameHosts (pulumi.Input[list])

  • targetCell (pulumi.Input[str])

The vendor_options object supports the following:

  • ignoreResizeConfirmation (pulumi.Input[bool])

access_ip_v4 = None

The first detected Fixed IPv4 address.

access_ip_v6 = None

The first detected Fixed IPv6 address.

admin_pass = None

The administrative password to assign to the server. Changing this changes the root password on the existing server.

availability_zone = None

The availability zone in which to create the server. Changing this creates a new server.

block_devices = None

Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.

  • bootIndex (float)

  • deleteOnTermination (bool)

  • destinationType (str)

  • deviceType (str)

  • diskBus (str)

  • guestFormat (str)

  • sourceType (str)

  • uuid (str)

  • volumeSize (float)

config_drive = None

Whether to use the config_drive feature to configure the instance. Changing this creates a new server.

flavor_id = None

The flavor ID of the desired flavor for the server. Changing this resizes the existing server.

flavor_name = None

The name of the desired flavor for the server. Changing this resizes the existing server.

force_delete = None

Whether to force the OpenStack instance to be forcefully deleted. This is useful for environments that have reclaim / soft deletion enabled.

image_id = None

(Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.

image_name = None

(Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.

key_pair = None

The name of a key pair to put on the server. The key pair must already be created and associated with the tenant’s account. Changing this creates a new server.

metadata = None

Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.

name = None

A unique name for the resource.

networks = None

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.

  • accessNetwork (bool)

  • fixedIpV4 (str)

  • fixedIpV6 (str)

  • mac (str)

  • name (str) - A unique name for the resource.

  • port (str)

  • uuid (str)

personalities = None

Customize the personality of an instance by defining one or more files and their contents. The personality structure is described below.

  • content (str)

  • file (str)

power_state = None

Provide the VM state. Only ‘active’ and ‘shutoff’ are supported values. Note: If the initial power_state is the shutoff the VM will be stopped immediately after build and the provisioners like remote-exec or files are not supported.

region = None

The region in which to create the server instance. If omitted, the region argument of the provider is used. Changing this creates a new server.

scheduler_hints = None

Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.

  • additionalProperties (dict)

  • buildNearHostIp (str)

  • differentHosts (list)

  • group (str)

  • queries (list)

  • sameHosts (list)

  • targetCell (str)

security_groups = None

An array of one or more security group names or ids to associate with the server. Changing this results in adding/removing security groups from the existing server. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

stop_before_destroy = None

Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn’t stop within timeout, it will be destroyed anyway.

user_data = None

The user data to provide when launching the instance. Changing this creates a new server.

vendor_options = None

Map of additional vendor-specific options. Supported options are described below.

  • ignoreResizeConfirmation (bool)

static get(resource_name, id, opts=None, access_ip_v4=None, access_ip_v6=None, admin_pass=None, all_metadata=None, availability_zone=None, block_devices=None, config_drive=None, flavor_id=None, flavor_name=None, force_delete=None, image_id=None, image_name=None, key_pair=None, metadata=None, name=None, networks=None, personalities=None, power_state=None, region=None, scheduler_hints=None, security_groups=None, stop_before_destroy=None, user_data=None, vendor_options=None)

Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • access_ip_v4 (pulumi.Input[str]) – The first detected Fixed IPv4 address.

  • access_ip_v6 (pulumi.Input[str]) – The first detected Fixed IPv6 address.

  • admin_pass (pulumi.Input[str]) – The administrative password to assign to the server. Changing this changes the root password on the existing server.

  • availability_zone (pulumi.Input[str]) – The availability zone in which to create the server. Changing this creates a new server.

  • block_devices (pulumi.Input[list]) –

    Configuration of block devices. The block_device structure is documented below. Changing this creates a new server. You can specify multiple block devices which will create an instance with multiple disks. This configuration is very flexible, so please see the following reference for more information.

  • config_drive (pulumi.Input[bool]) – Whether to use the config_drive feature to configure the instance. Changing this creates a new server.

  • flavor_id (pulumi.Input[str]) – The flavor ID of the desired flavor for the server. Changing this resizes the existing server.

  • flavor_name (pulumi.Input[str]) – The name of the desired flavor for the server. Changing this resizes the existing server.

  • force_delete (pulumi.Input[bool]) – Whether to force the OpenStack instance to be forcefully deleted. This is useful for environments that have reclaim / soft deletion enabled.

  • image_id (pulumi.Input[str]) – (Optional; Required if image_name is empty and not booting from a volume. Do not specify if booting from a volume.) The image ID of the desired image for the server. Changing this creates a new server.

  • image_name (pulumi.Input[str]) – (Optional; Required if image_id is empty and not booting from a volume. Do not specify if booting from a volume.) The name of the desired image for the server. Changing this creates a new server.

  • key_pair (pulumi.Input[str]) – The name of a key pair to put on the server. The key pair must already be created and associated with the tenant’s account. Changing this creates a new server.

  • metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.

  • name (pulumi.Input[str]) – A unique name for the resource.

  • networks (pulumi.Input[list]) – An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new server.

  • personalities (pulumi.Input[list]) – Customize the personality of an instance by defining one or more files and their contents. The personality structure is described below.

  • power_state (pulumi.Input[str]) – Provide the VM state. Only ‘active’ and ‘shutoff’ are supported values. Note: If the initial power_state is the shutoff the VM will be stopped immediately after build and the provisioners like remote-exec or files are not supported.

  • region (pulumi.Input[str]) – The region in which to create the server instance. If omitted, the region argument of the provider is used. Changing this creates a new server.

  • scheduler_hints (pulumi.Input[list]) – Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.

  • security_groups (pulumi.Input[list]) – An array of one or more security group names or ids to associate with the server. Changing this results in adding/removing security groups from the existing server. Note: When attaching the instance to networks using Ports, place the security groups on the Port and not the instance.

  • stop_before_destroy (pulumi.Input[bool]) – Whether to try stop instance gracefully before destroying it, thus giving chance for guest OS daemons to stop correctly. If instance doesn’t stop within timeout, it will be destroyed anyway.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Changing this creates a new server.

  • vendor_options (pulumi.Input[dict]) – Map of additional vendor-specific options. Supported options are described below.

The block_devices object supports the following:

  • bootIndex (pulumi.Input[float])

  • deleteOnTermination (pulumi.Input[bool])

  • destinationType (pulumi.Input[str])

  • deviceType (pulumi.Input[str])

  • diskBus (pulumi.Input[str])

  • guestFormat (pulumi.Input[str])

  • sourceType (pulumi.Input[str])

  • uuid (pulumi.Input[str])

  • volumeSize (pulumi.Input[float])

The networks object supports the following:

  • accessNetwork (pulumi.Input[bool])

  • fixedIpV4 (pulumi.Input[str])

  • fixedIpV6 (pulumi.Input[str])

  • mac (pulumi.Input[str])

  • name (pulumi.Input[str]) - A unique name for the resource.

  • port (pulumi.Input[str])

  • uuid (pulumi.Input[str])

The personalities object supports the following:

  • content (pulumi.Input[str])

  • file (pulumi.Input[str])

The scheduler_hints object supports the following:

  • additionalProperties (pulumi.Input[dict])

  • buildNearHostIp (pulumi.Input[str])

  • differentHosts (pulumi.Input[list])

  • group (pulumi.Input[str])

  • queries (pulumi.Input[list])

  • sameHosts (pulumi.Input[list])

  • targetCell (pulumi.Input[str])

The vendor_options object supports the following:

  • ignoreResizeConfirmation (pulumi.Input[bool])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.InterfaceAttach(resource_name, opts=None, fixed_ip=None, instance_id=None, network_id=None, port_id=None, region=None, __props__=None, __name__=None, __opts__=None)

Attaches a Network Interface (a Port) to an Instance using the OpenStack Compute (Nova) v2 API.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fixed_ip (pulumi.Input[str]) – An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy a network_id. The IP address must lie in a range on the supplied network.

  • instance_id (pulumi.Input[str]) – The ID of the Instance to attach the Port or Network to.

  • network_id (pulumi.Input[str]) – The ID of the Network to attach to an Instance. A port will be created automatically. NOTE: This option and port_id are mutually exclusive.

  • port_id (pulumi.Input[str]) – The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.

  • region (pulumi.Input[str]) – The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.

fixed_ip = None

An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy a network_id. The IP address must lie in a range on the supplied network.

instance_id = None

The ID of the Instance to attach the Port or Network to.

network_id = None

The ID of the Network to attach to an Instance. A port will be created automatically. NOTE: This option and port_id are mutually exclusive.

port_id = None

The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.

region = None

The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.

static get(resource_name, id, opts=None, fixed_ip=None, instance_id=None, network_id=None, port_id=None, region=None)

Get an existing InterfaceAttach resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fixed_ip (pulumi.Input[str]) – An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy a network_id. The IP address must lie in a range on the supplied network.

  • instance_id (pulumi.Input[str]) – The ID of the Instance to attach the Port or Network to.

  • network_id (pulumi.Input[str]) – The ID of the Network to attach to an Instance. A port will be created automatically. NOTE: This option and port_id are mutually exclusive.

  • port_id (pulumi.Input[str]) – The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.

  • region (pulumi.Input[str]) – The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.Keypair(resource_name, opts=None, name=None, public_key=None, region=None, value_specs=None, __props__=None, __name__=None, __opts__=None)

Create a Keypair resource with the given unique name, props, and options.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – A unique name for the keypair. Changing this creates a new keypair.

  • public_key (pulumi.Input[str]) – A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.

  • value_specs (pulumi.Input[dict]) – Map of additional options.

fingerprint = None

The fingerprint of the public key.

name = None

A unique name for the keypair. Changing this creates a new keypair.

private_key = None

The generated private key when no public key is specified.

public_key = None

A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.

region = None

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.

value_specs = None

Map of additional options.

static get(resource_name, id, opts=None, fingerprint=None, name=None, private_key=None, public_key=None, region=None, value_specs=None)

Get an existing Keypair resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fingerprint (pulumi.Input[str]) – The fingerprint of the public key.

  • name (pulumi.Input[str]) – A unique name for the keypair. Changing this creates a new keypair.

  • private_key (pulumi.Input[str]) – The generated private key when no public key is specified.

  • public_key (pulumi.Input[str]) – A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.

  • value_specs (pulumi.Input[dict]) – Map of additional options.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.SecGroup(resource_name, opts=None, description=None, name=None, region=None, rules=None, __props__=None, __name__=None, __opts__=None)

Manages a V2 security group resource within OpenStack.

Please note that managing security groups through the OpenStack Compute API has been deprecated. Unless you are using an older OpenStack environment, it is recommended to use the networking.SecGroup and networking.SecGroupRule resources instead, which uses the OpenStack Networking API.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A description for the security group. Changing this updates the description of an existing security group.

  • name (pulumi.Input[str]) – A unique name for the security group. Changing this updates the name of an existing security group.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a security group. If omitted, the region argument of the provider is used. Changing this creates a new security group.

  • rules (pulumi.Input[list]) – A rule describing how the security group operates. The rule object structure is documented below. Changing this updates the security group rules. As shown in the example above, multiple rule blocks may be used.

The rules object supports the following:

  • cidr (pulumi.Input[str])

  • fromGroupId (pulumi.Input[str])

  • fromPort (pulumi.Input[float])

  • id (pulumi.Input[str])

  • ipProtocol (pulumi.Input[str])

  • self (pulumi.Input[bool])

  • toPort (pulumi.Input[float])

description = None

A description for the security group. Changing this updates the description of an existing security group.

name = None

A unique name for the security group. Changing this updates the name of an existing security group.

region = None

The region in which to obtain the V2 Compute client. A Compute client is needed to create a security group. If omitted, the region argument of the provider is used. Changing this creates a new security group.

rules = None

A rule describing how the security group operates. The rule object structure is documented below. Changing this updates the security group rules. As shown in the example above, multiple rule blocks may be used.

  • cidr (str)

  • fromGroupId (str)

  • fromPort (float)

  • id (str)

  • ipProtocol (str)

  • self (bool)

  • toPort (float)

static get(resource_name, id, opts=None, description=None, name=None, region=None, rules=None)

Get an existing SecGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A description for the security group. Changing this updates the description of an existing security group.

  • name (pulumi.Input[str]) – A unique name for the security group. Changing this updates the name of an existing security group.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a security group. If omitted, the region argument of the provider is used. Changing this creates a new security group.

  • rules (pulumi.Input[list]) – A rule describing how the security group operates. The rule object structure is documented below. Changing this updates the security group rules. As shown in the example above, multiple rule blocks may be used.

The rules object supports the following:

  • cidr (pulumi.Input[str])

  • fromGroupId (pulumi.Input[str])

  • fromPort (pulumi.Input[float])

  • id (pulumi.Input[str])

  • ipProtocol (pulumi.Input[str])

  • self (pulumi.Input[bool])

  • toPort (pulumi.Input[float])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.ServerGroup(resource_name, opts=None, name=None, policies=None, region=None, value_specs=None, __props__=None, __name__=None, __opts__=None)

Manages a V2 Server Group resource within OpenStack.

  • affinity - All instances/servers launched in this group will be hosted on

    the same compute node.

  • anti-affinity - All instances/servers launched in this group will be

    hosted on different compute nodes.

  • soft-affinity - All instances/servers launched in this group will be hosted

    on the same compute node if possible, but if not possible they still will be scheduled instead of failure. To use this policy your OpenStack environment should support Compute service API 2.15 or above.

  • soft-anti-affinity - All instances/servers launched in this group will be

    hosted on different compute nodes if possible, but if not possible they still will be scheduled instead of failure. To use this policy your OpenStack environment should support Compute service API 2.15 or above.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – A unique name for the server group. Changing this creates a new server group.

  • policies (pulumi.Input[list]) – The set of policies for the server group. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.

  • value_specs (pulumi.Input[dict]) – Map of additional options.

members = None

The instances that are part of this server group.

name = None

A unique name for the server group. Changing this creates a new server group.

policies = None

The set of policies for the server group. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.

region = None

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.

value_specs = None

Map of additional options.

static get(resource_name, id, opts=None, members=None, name=None, policies=None, region=None, value_specs=None)

Get an existing ServerGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • members (pulumi.Input[list]) – The instances that are part of this server group.

  • name (pulumi.Input[str]) – A unique name for the server group. Changing this creates a new server group.

  • policies (pulumi.Input[list]) – The set of policies for the server group. All policies are mutually exclusive. See the Policies section for more information. Changing this creates a new server group.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used. Changing this creates a new server group.

  • value_specs (pulumi.Input[dict]) – Map of additional options.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_openstack.compute.VolumeAttach(resource_name, opts=None, device=None, instance_id=None, multiattach=None, region=None, volume_id=None, __props__=None, __name__=None, __opts__=None)

Attaches a Block Storage Volume to an Instance using the OpenStack Compute (Nova) v2 API.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • instance_id (pulumi.Input[str]) – The ID of the Instance to attach the Volume to.

  • multiattach (pulumi.Input[bool]) – Enable attachment of multiattach-capable volumes.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

  • volume_id (pulumi.Input[str]) – The ID of the Volume to attach to an Instance.

instance_id = None

The ID of the Instance to attach the Volume to.

multiattach = None

Enable attachment of multiattach-capable volumes.

region = None

The region in which to obtain the V2 Compute client. A Compute client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

volume_id = None

The ID of the Volume to attach to an Instance.

static get(resource_name, id, opts=None, device=None, instance_id=None, multiattach=None, region=None, volume_id=None)

Get an existing VolumeAttach resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • instance_id (pulumi.Input[str]) – The ID of the Instance to attach the Volume to.

  • multiattach (pulumi.Input[bool]) – Enable attachment of multiattach-capable volumes.

  • region (pulumi.Input[str]) – The region in which to obtain the V2 Compute client. A Compute client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

  • volume_id (pulumi.Input[str]) – The ID of the Volume to attach to an Instance.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_openstack.compute.get_availability_zones(region=None, state=None, opts=None)

Use this data source to get a list of availability zones from OpenStack

Parameters
  • region (str) – The region to fetch availability zones from, defaults to the provider’s region

  • state (str) – The state of the availability zones to match, default (“available”).

pulumi_openstack.compute.get_flavor(disk=None, flavor_id=None, min_disk=None, min_ram=None, name=None, ram=None, region=None, rx_tx_factor=None, swap=None, vcpus=None, opts=None)

Use this data source to get the ID of an available OpenStack flavor.

Parameters
  • disk (float) – The exact amount of disk (in gigabytes).

  • flavor_id (str) – The ID of the flavor. Conflicts with the name, min_ram and min_disk

  • 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 region argument of the provider is used.

  • rx_tx_factor (float) – The rx_tx_factor of the flavor.

  • swap (float) – The amount of swap (in gigabytes).

  • vcpus (float) – The amount of VCPUs.

pulumi_openstack.compute.get_keypair(name=None, region=None, opts=None)

Use this data source to get the ID and public key of an OpenStack keypair.

Parameters
  • name (str) – The unique name of the keypair.

  • region (str) – The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.