This page documents the language specification for the openstack package. If you're looking for help working with the inputs, outputs, or functions of openstack resources in a Pulumi program, please see the resource documentation for examples and API reference.
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(id=None, names=None, region=None, state=None)¶
- class
pulumi_openstack.compute.AwaitableGetFlavorResult(disk=None, extra_specs=None, flavor_id=None, 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)¶
- class
pulumi_openstack.compute.AwaitableGetKeypairResult(fingerprint=None, id=None, name=None, public_key=None, region=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.
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")
- 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
regionargument 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: pulumi.Output[float] = None¶The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.
extra_specs: pulumi.Output[dict] = None¶Key/Value pairs of metadata for the flavor.
is_public: pulumi.Output[bool] = None¶Whether the flavor is public. Changing this creates a new flavor.
name: pulumi.Output[str] = None¶A unique name for the flavor. Changing this creates a new flavor.
ram: pulumi.Output[float] = None¶The amount of RAM to use, in megabytes. Changing this creates a new flavor.
region: pulumi.Output[str] = 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
regionargument of the provider is used. Changing this creates a new flavor.
rx_tx_factor: pulumi.Output[float] = None¶RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
swap: pulumi.Output[float] = None¶The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
vcpus: pulumi.Output[float] = 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
regionargument 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.
import pulumi import pulumi_openstack as openstack project1 = openstack.identity.Project("project1") flavor1 = openstack.compute.Flavor("flavor1", disk="20", is_public=False, ram="8096", vcpus="2") access1 = openstack.compute.FlavorAccess("access1", flavor_id=flavor1.id, tenant_id=project1.id)
- 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
regionargument 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: pulumi.Output[str] = None¶The UUID of flavor to use. Changing this creates a new flavor access.
region: pulumi.Output[str] = None¶The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new flavor access.
tenant_id: pulumi.Output[str] = 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
regionargument 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.FloatingIpresource instead, which uses the OpenStack Networking API.import pulumi import pulumi_openstack as openstack floatip1 = openstack.compute.FloatingIp("floatip1", pool="public")
- 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
regionargument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
address: pulumi.Output[str] = None¶The actual floating IP address itself.
fixed_ip: pulumi.Output[str] = None¶The fixed IP address corresponding to the floating IP.
instance_id: pulumi.Output[str] = None¶UUID of the compute instance associated with the floating IP.
pool: pulumi.Output[str] = None¶The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
region: pulumi.Output[str] = 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
regionargument 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
regionargument 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_ipoptions incompute.Instance.import pulumi import pulumi_openstack as openstack instance1 = openstack.compute.Instance("instance1", flavor_id=3, image_id="ad091b52-742f-469e-8f3c-fd81cadf0743", key_pair="my_key_pair_name", security_groups=["default"]) fip1_floating_ip = openstack.networking.FloatingIp("fip1FloatingIp", pool="my_pool") fip1_floating_ip_associate = openstack.compute.FloatingIpAssociate("fip1FloatingIpAssociate", floating_ip=fip1_floating_ip.address, instance_id=instance1.id)
import pulumi import pulumi_openstack as openstack instance1 = openstack.compute.Instance("instance1", flavor_id=3, image_id="ad091b52-742f-469e-8f3c-fd81cadf0743", key_pair="my_key_pair_name", networks=[ { "name": "my_network", }, { "name": "default", }, ], security_groups=["default"]) fip1_floating_ip = openstack.networking.FloatingIp("fip1FloatingIp", pool="my_pool") fip1_floating_ip_associate = openstack.compute.FloatingIpAssociate("fip1FloatingIpAssociate", fixed_ip=instance1.networks[1]["fixedIpV4"], floating_ip=fip1_floating_ip.address, instance_id=instance1.id)
- 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
regionargument of the provider is used. Changing this creates a new floatingip_associate.
fixed_ip: pulumi.Output[str] = None¶The specific IP address to direct traffic to.
floating_ip: pulumi.Output[str] = None¶The floating IP to associate.
instance_id: pulumi.Output[str] = None¶The instance to associte the floating IP with.
region: pulumi.Output[str] = 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
regionargument 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
regionargument 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(id=None, names=None, region=None, state=None)¶ A collection of values returned by getAvailabilityZones.
id= None¶The provider-assigned unique ID for this managed resource.
names= None¶The names of the availability zones, ordered alphanumerically, that match the queried
state
- class
pulumi_openstack.compute.GetFlavorResult(disk=None, extra_specs=None, flavor_id=None, 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)¶ A collection of values returned by getFlavor.
extra_specs= None¶Key/Value pairs of metadata for the flavor.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_openstack.compute.GetKeypairResult(fingerprint=None, id=None, name=None, public_key=None, region=None)¶ A collection of values returned by getKeypair.
fingerprint= None¶The fingerprint of the OpenSSH key.
id= None¶The provider-assigned unique ID for this managed resource.
name= None¶See Argument Reference above.
public_key= None¶The OpenSSH-formatted public key of the keypair.
region= None¶See Argument Reference above.
- class
pulumi_openstack.compute.Instance(resource_name, opts=None, access_ip_v4=None, access_ip_v6=None, admin_pass=None, availability_zone=None, availability_zone_hints=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, tags=None, user_data=None, vendor_options=None, __props__=None, __name__=None, __opts__=None)¶ Create a Instance resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] access_ip_v4: The first detected Fixed IPv4 address. :param pulumi.Input[str] access_ip_v6: The first detected Fixed IPv6 address. :param pulumi.Input[str] admin_pass: The administrative password to assign to the server.
Changing this changes the root password on the existing server.
- Parameters
availability_zone (pulumi.Input[str]) – The availability zone in which to create the server. Conflicts with
availability_zone_hints. Changing this creates a new server.availability_zone_hints (pulumi.Input[str]) – The availability zone in which to create the server. This argument is preferred to
availability_zone, when scheduling the server on a particular host or node. Conflicts withavailability_zone. 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_nameis 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_idis 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]) – The human-readable name of the network. Changing this creates a new server.
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
regionargument 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.
tags (pulumi.Input[list]) – A set of string tags for the instance. Changing this updates the existing instance tags.
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]) - The boot index of the volume. It defaults to 0. Changing this creates a new server.deleteOnTermination(pulumi.Input[bool]) - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.destinationType(pulumi.Input[str]) - The type that gets created. Possible values are “volume” and “local”. Changing this creates a new server.deviceType(pulumi.Input[str]) - The low-level device type that will be used. Most common thing is to leave this empty. Changing this creates a new server.diskBus(pulumi.Input[str]) - The low-level disk bus that will be used. Most common thing is to leave this empty. Changing this creates a new server.guestFormat(pulumi.Input[str])sourceType(pulumi.Input[str]) - The source type of the device. Must be one of “blank”, “image”, “volume”, or “snapshot”. Changing this creates a new server.uuid(pulumi.Input[str]) - The UUID of the image, volume, or snapshot. Changing this creates a new server.volumeSize(pulumi.Input[float]) - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, source=blank and destination=local, and source=blank and destination=volume. Changing this creates a new server.volume_type(pulumi.Input[str]) - The volume type that will be used, for example SSD or HDD storage. The available options depend on how your specific OpenStack cloud is configured and what classes of storage are provided. Changing this creates a new server.
The networks object supports the following:
accessNetwork(pulumi.Input[bool]) - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.fixedIpV4(pulumi.Input[str]) - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.fixedIpV6(pulumi.Input[str])mac(pulumi.Input[str])name(pulumi.Input[str]) - The human-readable name of the network. Changing this creates a new server.port(pulumi.Input[str]) - The port UUID of a network to attach to the server. Changing this creates a new server.uuid(pulumi.Input[str]) - The UUID of the image, volume, or snapshot. Changing this creates a new server.
The personalities object supports the following:
content(pulumi.Input[str]) - The contents of the file. Limited to 255 bytes.file(pulumi.Input[str]) - The absolute path of the destination file.
The scheduler_hints object supports the following:
additionalProperties(pulumi.Input[dict]) - Arbitrary key/value pairs of additional properties to pass to the scheduler.buildNearHostIp(pulumi.Input[str]) - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.differentHosts(pulumi.Input[list]) - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.group(pulumi.Input[str]) - A UUID of a Server Group. The instance will be placed into that group.queries(pulumi.Input[list]) - A conditional query that a compute node must pass in order to host an instance. The query must use theJsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:sameHosts(pulumi.Input[list]) - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.targetCell(pulumi.Input[str]) - The name of a cell to host the instance.
The vendor_options object supports the following:
detachPortsBeforeDestroy(pulumi.Input[bool]) - Whether to try to detach all attached ports to the vm before destroying it to make sure the port state is correct after the vm destruction. This is helpful when the port is not deleted.ignoreResizeConfirmation(pulumi.Input[bool]) - Boolean to control whether to ignore manual confirmation of the instance resizing. This can be helpful to work with some OpenStack clouds which automatically confirm resizing of instances after some timeout.
access_ip_v4: pulumi.Output[str] = None¶The first detected Fixed IPv4 address.
access_ip_v6: pulumi.Output[str] = None¶The first detected Fixed IPv6 address.
admin_pass: pulumi.Output[str] = None¶The administrative password to assign to the server. Changing this changes the root password on the existing server.
The collection of tags assigned on the instance, which have been explicitly and implicitly added.
availability_zone: pulumi.Output[str] = None¶The availability zone in which to create the server. Conflicts with
availability_zone_hints. Changing this creates a new server.
availability_zone_hints: pulumi.Output[str] = None¶The availability zone in which to create the server. This argument is preferred to
availability_zone, when scheduling the server on a particular host or node. Conflicts withavailability_zone. Changing this creates a new server.
block_devices: pulumi.Output[list] = 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) - The boot index of the volume. It defaults to 0. Changing this creates a new server.deleteOnTermination(bool) - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.destinationType(str) - The type that gets created. Possible values are “volume” and “local”. Changing this creates a new server.deviceType(str) - The low-level device type that will be used. Most common thing is to leave this empty. Changing this creates a new server.diskBus(str) - The low-level disk bus that will be used. Most common thing is to leave this empty. Changing this creates a new server.guestFormat(str)sourceType(str) - The source type of the device. Must be one of “blank”, “image”, “volume”, or “snapshot”. Changing this creates a new server.uuid(str) - The UUID of the image, volume, or snapshot. Changing this creates a new server.volumeSize(float) - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, source=blank and destination=local, and source=blank and destination=volume. Changing this creates a new server.volume_type(str) - The volume type that will be used, for example SSD or HDD storage. The available options depend on how your specific OpenStack cloud is configured and what classes of storage are provided. Changing this creates a new server.
config_drive: pulumi.Output[bool] = None¶Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
flavor_id: pulumi.Output[str] = None¶The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
flavor_name: pulumi.Output[str] = None¶The name of the desired flavor for the server. Changing this resizes the existing server.
force_delete: pulumi.Output[bool] = None¶Whether to force the OpenStack instance to be forcefully deleted. This is useful for environments that have reclaim / soft deletion enabled.
image_id: pulumi.Output[str] = None¶(Optional; Required if
image_nameis 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.Output[str] = None¶(Optional; Required if
image_idis 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.Output[str] = 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: pulumi.Output[dict] = None¶Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
name: pulumi.Output[str] = None¶The human-readable name of the network. Changing this creates a new server.
networks: pulumi.Output[list] = 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) - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.fixedIpV4(str) - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.fixedIpV6(str)mac(str)name(str) - The human-readable name of the network. Changing this creates a new server.port(str) - The port UUID of a network to attach to the server. Changing this creates a new server.uuid(str) - The UUID of the image, volume, or snapshot. Changing this creates a new server.
personalities: pulumi.Output[list] = None¶Customize the personality of an instance by defining one or more files and their contents. The personality structure is described below.
content(str) - The contents of the file. Limited to 255 bytes.file(str) - The absolute path of the destination file.
power_state: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The region in which to create the server instance. If omitted, the
regionargument of the provider is used. Changing this creates a new server.
scheduler_hints: pulumi.Output[list] = None¶Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
additionalProperties(dict) - Arbitrary key/value pairs of additional properties to pass to the scheduler.buildNearHostIp(str) - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.differentHosts(list) - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.group(str) - A UUID of a Server Group. The instance will be placed into that group.queries(list) - A conditional query that a compute node must pass in order to host an instance. The query must use theJsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:sameHosts(list) - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.targetCell(str) - The name of a cell to host the instance.
security_groups: pulumi.Output[list] = 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: pulumi.Output[bool] = 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.
A set of string tags for the instance. Changing this updates the existing instance tags.
user_data: pulumi.Output[str] = None¶The user data to provide when launching the instance. Changing this creates a new server.
vendor_options: pulumi.Output[dict] = None¶Map of additional vendor-specific options. Supported options are described below.
detachPortsBeforeDestroy(bool) - Whether to try to detach all attached ports to the vm before destroying it to make sure the port state is correct after the vm destruction. This is helpful when the port is not deleted.ignoreResizeConfirmation(bool) - Boolean to control whether to ignore manual confirmation of the instance resizing. This can be helpful to work with some OpenStack clouds which automatically confirm resizing of instances after some timeout.
- static
get(resource_name, id, opts=None, access_ip_v4=None, access_ip_v6=None, admin_pass=None, all_metadata=None, all_tags=None, availability_zone=None, availability_zone_hints=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, tags=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.
all_tags (pulumi.Input[list]) – The collection of tags assigned on the instance, which have been explicitly and implicitly added.
availability_zone (pulumi.Input[str]) – The availability zone in which to create the server. Conflicts with
availability_zone_hints. Changing this creates a new server.availability_zone_hints (pulumi.Input[str]) –
The availability zone in which to create the server. This argument is preferred to
availability_zone, when scheduling the server on a particular host or node. Conflicts withavailability_zone. 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_nameis 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_idis 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]) – The human-readable name of the network. Changing this creates a new server.
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
regionargument 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.
tags (pulumi.Input[list]) – A set of string tags for the instance. Changing this updates the existing instance tags.
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]) - The boot index of the volume. It defaults to 0. Changing this creates a new server.deleteOnTermination(pulumi.Input[bool]) - Delete the volume / block device upon termination of the instance. Defaults to false. Changing this creates a new server.destinationType(pulumi.Input[str]) - The type that gets created. Possible values are “volume” and “local”. Changing this creates a new server.deviceType(pulumi.Input[str]) - The low-level device type that will be used. Most common thing is to leave this empty. Changing this creates a new server.diskBus(pulumi.Input[str]) - The low-level disk bus that will be used. Most common thing is to leave this empty. Changing this creates a new server.guestFormat(pulumi.Input[str])sourceType(pulumi.Input[str]) - The source type of the device. Must be one of “blank”, “image”, “volume”, or “snapshot”. Changing this creates a new server.uuid(pulumi.Input[str]) - The UUID of the image, volume, or snapshot. Changing this creates a new server.volumeSize(pulumi.Input[float]) - The size of the volume to create (in gigabytes). Required in the following combinations: source=image and destination=volume, source=blank and destination=local, and source=blank and destination=volume. Changing this creates a new server.volume_type(pulumi.Input[str]) - The volume type that will be used, for example SSD or HDD storage. The available options depend on how your specific OpenStack cloud is configured and what classes of storage are provided. Changing this creates a new server.
The networks object supports the following:
accessNetwork(pulumi.Input[bool]) - Specifies if this network should be used for provisioning access. Accepts true or false. Defaults to false.fixedIpV4(pulumi.Input[str]) - Specifies a fixed IPv4 address to be used on this network. Changing this creates a new server.fixedIpV6(pulumi.Input[str])mac(pulumi.Input[str])name(pulumi.Input[str]) - The human-readable name of the network. Changing this creates a new server.port(pulumi.Input[str]) - The port UUID of a network to attach to the server. Changing this creates a new server.uuid(pulumi.Input[str]) - The UUID of the image, volume, or snapshot. Changing this creates a new server.
The personalities object supports the following:
content(pulumi.Input[str]) - The contents of the file. Limited to 255 bytes.file(pulumi.Input[str]) - The absolute path of the destination file.
The scheduler_hints object supports the following:
additionalProperties(pulumi.Input[dict]) - Arbitrary key/value pairs of additional properties to pass to the scheduler.buildNearHostIp(pulumi.Input[str]) - An IP Address in CIDR form. The instance will be placed on a compute node that is in the same subnet.differentHosts(pulumi.Input[list]) - A list of instance UUIDs. The instance will be scheduled on a different host than all other instances.group(pulumi.Input[str]) - A UUID of a Server Group. The instance will be placed into that group.queries(pulumi.Input[list]) - A conditional query that a compute node must pass in order to host an instance. The query must use theJsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:sameHosts(pulumi.Input[list]) - A list of instance UUIDs. The instance will be scheduled on the same host of those specified.targetCell(pulumi.Input[str]) - The name of a cell to host the instance.
The vendor_options object supports the following:
detachPortsBeforeDestroy(pulumi.Input[bool]) - Whether to try to detach all attached ports to the vm before destroying it to make sure the port state is correct after the vm destruction. This is helpful when the port is not deleted.ignoreResizeConfirmation(pulumi.Input[bool]) - Boolean to control whether to ignore manual confirmation of the instance resizing. This can be helpful to work with some OpenStack clouds which automatically confirm resizing of instances after some timeout.
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.
import pulumi import pulumi_openstack as openstack network1 = openstack.networking.Network("network1", admin_state_up="true") instance1 = openstack.compute.Instance("instance1", security_groups=["default"]) ai1 = openstack.compute.InterfaceAttach("ai1", instance_id=instance1.id, network_id=openstack_networking_port_v2["network_1"]["id"])
import pulumi import pulumi_openstack as openstack network1 = openstack.networking.Network("network1", admin_state_up="true") instance1 = openstack.compute.Instance("instance1", security_groups=["default"]) ai1 = openstack.compute.InterfaceAttach("ai1", fixed_ip="10.0.10.10", instance_id=instance1.id, network_id=openstack_networking_port_v2["network_1"]["id"])
import pulumi import pulumi_openstack as openstack network1 = openstack.networking.Network("network1", admin_state_up="true") port1 = openstack.networking.Port("port1", admin_state_up="true", network_id=network1.id) instance1 = openstack.compute.Instance("instance1", security_groups=["default"]) ai1 = openstack.compute.InterfaceAttach("ai1", instance_id=instance1.id, port_id=port1.id)
- 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_idare mutually exclusive.port_id (pulumi.Input[str]) – The ID of the Port to attach to an Instance. NOTE: This option and
network_idare mutually exclusive.region (pulumi.Input[str]) – The region in which to create the interface attachment. If omitted, the
regionargument of the provider is used. Changing this creates a new attachment.
fixed_ip: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The ID of the Instance to attach the Port or Network to.
network_id: pulumi.Output[str] = None¶The ID of the Network to attach to an Instance. A port will be created automatically. NOTE: This option and
port_idare mutually exclusive.
port_id: pulumi.Output[str] = None¶The ID of the Port to attach to an Instance. NOTE: This option and
network_idare mutually exclusive.
region: pulumi.Output[str] = None¶The region in which to create the interface attachment. If omitted, the
regionargument 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_idare mutually exclusive.port_id (pulumi.Input[str]) – The ID of the Port to attach to an Instance. NOTE: This option and
network_idare mutually exclusive.region (pulumi.Input[str]) – The region in which to create the interface attachment. If omitted, the
regionargument 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. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: A unique name for the keypair. Changing this creates a new
keypair.
- Parameters
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
regionargument of the provider is used. Changing this creates a new keypair.value_specs (pulumi.Input[dict]) – Map of additional options.
fingerprint: pulumi.Output[str] = None¶The fingerprint of the public key.
name: pulumi.Output[str] = None¶A unique name for the keypair. Changing this creates a new keypair.
private_key: pulumi.Output[str] = None¶The generated private key when no public key is specified.
public_key: pulumi.Output[str] = 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: pulumi.Output[str] = 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
regionargument of the provider is used. Changing this creates a new keypair.
value_specs: pulumi.Output[dict] = 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
regionargument 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.QuotaSetV2(resource_name, opts=None, cores=None, fixed_ips=None, floating_ips=None, injected_file_content_bytes=None, injected_file_path_bytes=None, injected_files=None, instances=None, key_pairs=None, metadata_items=None, project_id=None, ram=None, region=None, security_group_rules=None, security_groups=None, server_group_members=None, server_groups=None, __props__=None, __name__=None, __opts__=None)¶ Manages a V2 compute quotaset resource within OpenStack.
Note: This usually requires admin privileges.
- Note: This resource has a no-op deletion so no actual actions will be done against the OpenStack API
in case of delete call.
import pulumi import pulumi_openstack as openstack project1 = openstack.identity.Project("project1") quotaset1 = openstack.compute.QuotaSetV2("quotaset1", project_id=project1.id, key_pairs=10, ram=40960, cores=32, instances=20, server_groups=4, server_group_members=8)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cores (pulumi.Input[float]) – Quota value for cores. Changing this updates the existing quotaset.
fixed_ips (pulumi.Input[float]) – Quota value for fixed IPs. Changing this updates the existing quotaset.
floating_ips (pulumi.Input[float]) – Quota value for floating IPs. Changing this updates the existing quotaset.
injected_file_content_bytes (pulumi.Input[float]) – Quota value for content bytes of injected files. Changing this updates the existing quotaset.
injected_file_path_bytes (pulumi.Input[float]) – Quota value for path bytes of injected files. Changing this updates the existing quotaset.
injected_files (pulumi.Input[float]) – Quota value for injected files. Changing this updates the existing quotaset.
instances (pulumi.Input[float]) – Quota value for instances. Changing this updates the existing quotaset.
key_pairs (pulumi.Input[float]) – Quota value for key pairs. Changing this updates the existing quotaset.
metadata_items (pulumi.Input[float]) – Quota value for metadata items. Changing this updates the existing quotaset.
project_id (pulumi.Input[str]) – ID of the project to manage quotas. Changing this creates a new quotaset.
ram (pulumi.Input[float]) – Quota value for RAM. Changing this updates the existing quotaset.
region (pulumi.Input[str]) – The region in which to create the volume. If omitted, the
regionargument of the provider is used. Changing this creates a new quotaset.security_group_rules (pulumi.Input[float]) – Quota value for security group rules. Changing this updates the existing quotaset.
security_groups (pulumi.Input[float]) – Quota value for security groups. Changing this updates the existing quotaset.
server_group_members (pulumi.Input[float]) – Quota value for server groups members. Changing this updates the existing quotaset.
server_groups (pulumi.Input[float]) – Quota value for server groups. Changing this updates the existing quotaset.
cores: pulumi.Output[float] = None¶Quota value for cores. Changing this updates the existing quotaset.
fixed_ips: pulumi.Output[float] = None¶Quota value for fixed IPs. Changing this updates the existing quotaset.
floating_ips: pulumi.Output[float] = None¶Quota value for floating IPs. Changing this updates the existing quotaset.
injected_file_content_bytes: pulumi.Output[float] = None¶Quota value for content bytes of injected files. Changing this updates the existing quotaset.
injected_file_path_bytes: pulumi.Output[float] = None¶Quota value for path bytes of injected files. Changing this updates the existing quotaset.
injected_files: pulumi.Output[float] = None¶Quota value for injected files. Changing this updates the existing quotaset.
instances: pulumi.Output[float] = None¶Quota value for instances. Changing this updates the existing quotaset.
key_pairs: pulumi.Output[float] = None¶Quota value for key pairs. Changing this updates the existing quotaset.
metadata_items: pulumi.Output[float] = None¶Quota value for metadata items. Changing this updates the existing quotaset.
project_id: pulumi.Output[str] = None¶ID of the project to manage quotas. Changing this creates a new quotaset.
ram: pulumi.Output[float] = None¶Quota value for RAM. Changing this updates the existing quotaset.
region: pulumi.Output[str] = None¶The region in which to create the volume. If omitted, the
regionargument of the provider is used. Changing this creates a new quotaset.
security_group_rules: pulumi.Output[float] = None¶Quota value for security group rules. Changing this updates the existing quotaset.
security_groups: pulumi.Output[float] = None¶Quota value for security groups. Changing this updates the existing quotaset.
server_group_members: pulumi.Output[float] = None¶Quota value for server groups members. Changing this updates the existing quotaset.
server_groups: pulumi.Output[float] = None¶Quota value for server groups. Changing this updates the existing quotaset.
- static
get(resource_name, id, opts=None, cores=None, fixed_ips=None, floating_ips=None, injected_file_content_bytes=None, injected_file_path_bytes=None, injected_files=None, instances=None, key_pairs=None, metadata_items=None, project_id=None, ram=None, region=None, security_group_rules=None, security_groups=None, server_group_members=None, server_groups=None)¶ Get an existing QuotaSetV2 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.
cores (pulumi.Input[float]) – Quota value for cores. Changing this updates the existing quotaset.
fixed_ips (pulumi.Input[float]) – Quota value for fixed IPs. Changing this updates the existing quotaset.
floating_ips (pulumi.Input[float]) – Quota value for floating IPs. Changing this updates the existing quotaset.
injected_file_content_bytes (pulumi.Input[float]) – Quota value for content bytes of injected files. Changing this updates the existing quotaset.
injected_file_path_bytes (pulumi.Input[float]) – Quota value for path bytes of injected files. Changing this updates the existing quotaset.
injected_files (pulumi.Input[float]) – Quota value for injected files. Changing this updates the existing quotaset.
instances (pulumi.Input[float]) – Quota value for instances. Changing this updates the existing quotaset.
key_pairs (pulumi.Input[float]) – Quota value for key pairs. Changing this updates the existing quotaset.
metadata_items (pulumi.Input[float]) – Quota value for metadata items. Changing this updates the existing quotaset.
project_id (pulumi.Input[str]) – ID of the project to manage quotas. Changing this creates a new quotaset.
ram (pulumi.Input[float]) – Quota value for RAM. Changing this updates the existing quotaset.
region (pulumi.Input[str]) – The region in which to create the volume. If omitted, the
regionargument of the provider is used. Changing this creates a new quotaset.security_group_rules (pulumi.Input[float]) – Quota value for security group rules. Changing this updates the existing quotaset.
security_groups (pulumi.Input[float]) – Quota value for security groups. Changing this updates the existing quotaset.
server_group_members (pulumi.Input[float]) – Quota value for server groups members. Changing this updates the existing quotaset.
server_groups (pulumi.Input[float]) – Quota value for server groups. Changing this updates the existing quotaset.
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.SecGroupandnetworking.SecGroupRuleresources instead, which uses the OpenStack Networking API.import pulumi import pulumi_openstack as openstack secgroup1 = openstack.compute.SecGroup("secgroup1", description="my security group", rules=[ { "cidr": "0.0.0.0/0", "fromPort": 22, "ipProtocol": "tcp", "toPort": 22, }, { "cidr": "0.0.0.0/0", "fromPort": 80, "ipProtocol": "tcp", "toPort": 80, }, ])
When using ICMP as the
ip_protocol, thefrom_portsets the ICMP type and theto_portsets the ICMP code. To allow all ICMP types, set each value to-1, like so:import pulumi
A list of ICMP types and codes can be found here.
When referencing a security group in a configuration (for example, a configuration creates a new security group and then needs to apply it to an instance being created in the same configuration), it is currently recommended to reference the security group by name and not by ID, like this:
import pulumi import pulumi_openstack as openstack test_server = openstack.compute.Instance("test-server", flavor_id="3", image_id="ad091b52-742f-469e-8f3c-fd81cadf0743", key_pair="my_key_pair_name", security_groups=[openstack_compute_secgroup_v2["secgroup_1"]["name"]])
- 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
descriptionof an existing security group.name (pulumi.Input[str]) – A unique name for the security group. Changing this updates the
nameof 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
regionargument 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]) - Required iffrom_group_idorselfis empty. The IP range that will be the source of network traffic to the security group. Use 0.0.0.0/0 to allow all IP addresses. Changing this creates a new security group rule. Cannot be combined withfrom_group_idorself.fromGroupId(pulumi.Input[str]) - Required ifcidrorselfis empty. The ID of a group from which to forward traffic to the parent group. Changing this creates a new security group rule. Cannot be combined withcidrorself.fromPort(pulumi.Input[float]) - An integer representing the lower bound of the port range to open. Changing this creates a new security group rule.id(pulumi.Input[str])ipProtocol(pulumi.Input[str]) - The protocol type that will be allowed. Changing this creates a new security group rule.self(pulumi.Input[bool]) - Required ifcidrandfrom_group_idis empty. If true, the security group itself will be added as a source to this ingress rule. Cannot be combined withcidrorfrom_group_id.toPort(pulumi.Input[float]) - An integer representing the upper bound of the port range to open. Changing this creates a new security group rule.
description: pulumi.Output[str] = None¶A description for the security group. Changing this updates the
descriptionof an existing security group.
name: pulumi.Output[str] = None¶A unique name for the security group. Changing this updates the
nameof an existing security group.
region: pulumi.Output[str] = None¶The region in which to obtain the V2 Compute client. A Compute client is needed to create a security group. If omitted, the
regionargument of the provider is used. Changing this creates a new security group.
rules: pulumi.Output[list] = 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) - Required iffrom_group_idorselfis empty. The IP range that will be the source of network traffic to the security group. Use 0.0.0.0/0 to allow all IP addresses. Changing this creates a new security group rule. Cannot be combined withfrom_group_idorself.fromGroupId(str) - Required ifcidrorselfis empty. The ID of a group from which to forward traffic to the parent group. Changing this creates a new security group rule. Cannot be combined withcidrorself.fromPort(float) - An integer representing the lower bound of the port range to open. Changing this creates a new security group rule.id(str)ipProtocol(str) - The protocol type that will be allowed. Changing this creates a new security group rule.self(bool) - Required ifcidrandfrom_group_idis empty. If true, the security group itself will be added as a source to this ingress rule. Cannot be combined withcidrorfrom_group_id.toPort(float) - An integer representing the upper bound of the port range to open. Changing this creates a new security group rule.
- 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
descriptionof an existing security group.name (pulumi.Input[str]) – A unique name for the security group. Changing this updates the
nameof 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
regionargument 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]) - Required iffrom_group_idorselfis empty. The IP range that will be the source of network traffic to the security group. Use 0.0.0.0/0 to allow all IP addresses. Changing this creates a new security group rule. Cannot be combined withfrom_group_idorself.fromGroupId(pulumi.Input[str]) - Required ifcidrorselfis empty. The ID of a group from which to forward traffic to the parent group. Changing this creates a new security group rule. Cannot be combined withcidrorself.fromPort(pulumi.Input[float]) - An integer representing the lower bound of the port range to open. Changing this creates a new security group rule.id(pulumi.Input[str])ipProtocol(pulumi.Input[str]) - The protocol type that will be allowed. Changing this creates a new security group rule.self(pulumi.Input[bool]) - Required ifcidrandfrom_group_idis empty. If true, the security group itself will be added as a source to this ingress rule. Cannot be combined withcidrorfrom_group_id.toPort(pulumi.Input[float]) - An integer representing the upper bound of the port range to open. Changing this creates a new security group rule.
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.
import pulumi import pulumi_openstack as openstack test_sg = openstack.compute.ServerGroup("test-sg", policies=["anti-affinity"])
affinity- All instances/servers launched in this group will be hosted onthe same compute node.
anti-affinity- All instances/servers launched in this group will behosted on different compute nodes.
soft-affinity- All instances/servers launched in this group will be hostedon 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 behosted 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
regionargument of the provider is used. Changing this creates a new server group.value_specs (pulumi.Input[dict]) – Map of additional options.
members: pulumi.Output[list] = None¶The instances that are part of this server group.
name: pulumi.Output[str] = None¶A unique name for the server group. Changing this creates a new server group.
policies: pulumi.Output[list] = 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: pulumi.Output[str] = None¶The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used. Changing this creates a new server group.
value_specs: pulumi.Output[dict] = 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
regionargument 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.
import pulumi import pulumi_openstack as openstack volume1 = openstack.blockstorage.VolumeV2("volume1", size=1) instance1 = openstack.compute.Instance("instance1", security_groups=["default"]) va1 = openstack.compute.VolumeAttach("va1", instance_id=instance1.id, volume_id=volume1.id)
import pulumi import pulumi_openstack as openstack volume1 = openstack.blockstorage.Volume("volume1", multiattach=True, size=1) instance1 = openstack.compute.Instance("instance1", security_groups=["default"]) instance2 = openstack.compute.Instance("instance2", security_groups=["default"]) va1 = openstack.compute.VolumeAttach("va1", instance_id=instance1.id, multiattach=True, volume_id=openstack_blockstorage_volume_v2["volume_1"]["id"]) va2 = openstack.compute.VolumeAttach("va2", instance_id=instance2.id, multiattach=True, volume_id=openstack_blockstorage_volume_v2["volume_1"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
device (pulumi.Input[str]) – See Argument Reference above. NOTE: The correctness of this information is dependent upon the hypervisor in use. In some cases, this should not be used as an authoritative piece of information.
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
regionargument 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.
device: pulumi.Output[str] = None¶See Argument Reference above. NOTE: The correctness of this information is dependent upon the hypervisor in use. In some cases, this should not be used as an authoritative piece of information.
instance_id: pulumi.Output[str] = None¶The ID of the Instance to attach the Volume to.
multiattach: pulumi.Output[bool] = None¶Enable attachment of multiattach-capable volumes.
region: pulumi.Output[str] = None¶The region in which to obtain the V2 Compute client. A Compute client is needed to create a volume attachment. If omitted, the
regionargument of the provider is used. Changing this creates a new volume attachment.
volume_id: pulumi.Output[str] = 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.
device (pulumi.Input[str]) – See Argument Reference above. NOTE: The correctness of this information is dependent upon the hypervisor in use. In some cases, this should not be used as an authoritative piece of information.
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
regionargument 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
import pulumi import pulumi_openstack as openstack zones = openstack.compute.get_availability_zones()
- Parameters
region (str) – The
regionto fetch availability zones from, defaults to the provider’sregionstate (str) – The
stateof the availability zones to match, default (“available”).
pulumi_openstack.compute.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)¶Use this data source to get the ID of an available OpenStack flavor.
import pulumi import pulumi_openstack as openstack small = openstack.compute.get_flavor(ram=512, vcpus=1)
- Parameters
disk (float) – The exact amount of disk (in gigabytes).
flavor_id (str) – The ID of the flavor. Conflicts with the
name,min_ramandmin_diskis_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_factor (float) – The
rx_tx_factorof 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.
import pulumi import pulumi_openstack as openstack kp = openstack.compute.get_keypair(name="sand")
- Parameters
name (str) – The unique name of the keypair.
region (str) – The region in which to obtain the V2 Compute client. If omitted, the
regionargument of the provider is used.