Package com.pulumi.openstack.compute
Class Instance
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.compute.Instance
-
public class Instance extends com.pulumi.resources.CustomResource
-
-
Constructor Summary
Constructors Constructor Description Instance(java.lang.String name)Instance(java.lang.String name, InstanceArgs args)Instance(java.lang.String name, InstanceArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>accessIpV4()com.pulumi.core.Output<java.lang.String>accessIpV6()com.pulumi.core.Output<java.util.Optional<java.lang.String>>adminPass()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>allMetadata()com.pulumi.core.Output<java.util.List<java.lang.String>>allTags()com.pulumi.core.Output<java.lang.String>availabilityZone()com.pulumi.core.Output<java.util.Optional<java.lang.String>>availabilityZoneHints()com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceBlockDevice>>>blockDevices()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>configDrive()com.pulumi.core.Output<java.lang.String>created()com.pulumi.core.Output<java.lang.String>flavorId()com.pulumi.core.Output<java.lang.String>flavorName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>floatingIp()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>forceDelete()static Instanceget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InstanceState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>imageId()com.pulumi.core.Output<java.lang.String>imageName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>keyPair()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>metadata()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.lang.String>>networkMode()com.pulumi.core.Output<java.util.List<InstanceNetwork>>networks()com.pulumi.core.Output<java.util.Optional<java.util.List<InstancePersonality>>>personalities()com.pulumi.core.Output<java.util.Optional<java.lang.String>>powerState()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceSchedulerHint>>>schedulerHints()com.pulumi.core.Output<java.util.List<java.lang.String>>securityGroups()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>stopBeforeDestroy()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>tags()com.pulumi.core.Output<java.lang.String>updated()com.pulumi.core.Output<java.util.Optional<java.lang.String>>userData()com.pulumi.core.Output<java.util.Optional<InstanceVendorOptions>>vendorOptions()com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceVolume>>>volumes()
-
-
-
Constructor Detail
-
Instance
public Instance(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Instance
public Instance(java.lang.String name, @Nullable InstanceArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Instance
public Instance(java.lang.String name, @Nullable InstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accessIpV4
public com.pulumi.core.Output<java.lang.String> accessIpV4()
- Returns:
- The first detected Fixed IPv4 address.
-
accessIpV6
public com.pulumi.core.Output<java.lang.String> accessIpV6()
- Returns:
- The first detected Fixed IPv6 address.
-
adminPass
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> adminPass()
- Returns:
- The administrative password to assign to the server. Changing this changes the root password on the existing server.
-
allMetadata
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> allMetadata()
-
allTags
public com.pulumi.core.Output<java.util.List<java.lang.String>> allTags()
- Returns:
- The collection of tags assigned on the instance, which have been explicitly and implicitly added.
-
availabilityZone
public com.pulumi.core.Output<java.lang.String> availabilityZone()
- Returns:
- The availability zone in which to create the server. Conflicts with `availability_zone_hints`. Changing this creates a new server.
-
availabilityZoneHints
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> availabilityZoneHints()
- Returns:
- The availability zone in which to create the server. This argument is preferred to `availability_zone`, when scheduling the server on a [particular](https://docs.openstack.org/nova/latest/admin/availability-zones.html) host or node. Conflicts with `availability_zone`. Changing this creates a new server.
-
blockDevices
public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceBlockDevice>>> blockDevices()
- Returns:
- 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](https://docs.openstack.org/nova/latest/user/block-device-mapping.html) for more information.
-
configDrive
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> configDrive()
- Returns:
- Whether to use the config_drive feature to configure the instance. Changing this creates a new server.
-
created
public com.pulumi.core.Output<java.lang.String> created()
- Returns:
- The creation time of the instance.
-
flavorId
public com.pulumi.core.Output<java.lang.String> flavorId()
- Returns:
- The flavor ID of the desired flavor for the server. Changing this resizes the existing server.
-
flavorName
public com.pulumi.core.Output<java.lang.String> flavorName()
- Returns:
- The name of the desired flavor for the server. Changing this resizes the existing server.
-
floatingIp
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> floatingIp()
-
forceDelete
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> forceDelete()
- Returns:
- Whether to force the OpenStack instance to be forcefully deleted. This is useful for environments that have reclaim / soft deletion enabled.
-
imageId
public com.pulumi.core.Output<java.lang.String> imageId()
- Returns:
- (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 rebuilds the existing server.
-
imageName
public com.pulumi.core.Output<java.lang.String> imageName()
- Returns:
- (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 rebuilds the existing server.
-
keyPair
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> keyPair()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>> metadata()
- Returns:
- Metadata key/value pairs to make available from within the instance. Changing this updates the existing server metadata.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A unique name for the resource.
-
networkMode
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> networkMode()
- Returns:
- Special string for `network` option to create the server. `network_mode` can be `"auto"` or `"none"`. Please see the following [reference](https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail#id11) for more information. Conflicts with `network`.
-
networks
public com.pulumi.core.Output<java.util.List<InstanceNetwork>> networks()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.util.List<InstancePersonality>>> personalities()
- Returns:
- Customize the personality of an instance by defining one or more files and their contents. The personality structure is described below. Changing this rebuilds the existing server.
-
powerState
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> powerState()
- Returns:
- Provide the VM state. Only 'active', 'shutoff' and 'shelved_offloaded' 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
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- 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.
-
schedulerHints
public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceSchedulerHint>>> schedulerHints()
- Returns:
- Provide the Nova scheduler with hints on how the instance should be launched. The available hints are described below.
-
securityGroups
public com.pulumi.core.Output<java.util.List<java.lang.String>> securityGroups()
- Returns:
- An array of one or more security group names 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. *Note*: Names should be used and not ids, as ids trigger unnecessary updates.
-
stopBeforeDestroy
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> stopBeforeDestroy()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()
- Returns:
- A set of string tags for the instance. Changing this updates the existing instance tags.
-
updated
public com.pulumi.core.Output<java.lang.String> updated()
- Returns:
- The time when the instance was last updated.
-
userData
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> userData()
- Returns:
- The user data to provide when launching the instance. Changing this creates a new server.
-
vendorOptions
public com.pulumi.core.Output<java.util.Optional<InstanceVendorOptions>> vendorOptions()
- Returns:
- Map of additional vendor-specific options. Supported options are described below.
-
volumes
public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceVolume>>> volumes()
-
get
public static Instance get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-