import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Instance resource in Oracle Cloud Infrastructure Core service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/Instance * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/ * * Creates a new instance in the specified compartment and the specified availability domain. * For general information about instances, see * [Overview of the Compute Service](https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm). * * For information about access control and compartments, see * [Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). * * For information about availability domains, see * [Regions and Availability Domains](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm). * To get a list of availability domains, use the `ListAvailabilityDomains` operation * in the Identity and Access Management Service API. * * All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, * unique ID called an Oracle Cloud Identifier (OCID). * When you create a resource, you can find its OCID in the response. You can * also retrieve a resource's OCID by using a List API operation * on that resource type, or by viewing the resource in the Console. * * To launch an instance using an image or a boot volume use the `sourceDetails` parameter in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/LaunchInstanceDetails). * * When you launch an instance, it is automatically attached to a virtual * network interface card (VNIC), called the *primary VNIC*. The VNIC * has a private IP address from the subnet's CIDR. You can either assign a * private IP address of your choice or let Oracle automatically assign one. * You can choose whether the instance has a public IP address. To retrieve the * addresses, use the [ListVnicAttachments](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/VnicAttachment/ListVnicAttachments) * operation to get the VNIC ID for the instance, and then call * [GetVnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/GetVnic) with the VNIC ID. * * You can later add secondary VNICs to an instance. For more information, see * [Virtual Network Interface Cards (VNICs)](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). * * To launch an instance from a Marketplace image listing, you must provide the image ID of the * listing resource version that you want, but you also must subscribe to the listing before you try * to launch the instance. To subscribe to the listing, use the [GetAppCatalogListingAgreements](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) * operation to get the signature for the terms of use agreement for the desired listing resource version. * Then, call [CreateAppCatalogSubscription](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) * with the signature. To get the image ID for the LaunchInstance operation, call * [GetAppCatalogListingResourceVersion](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion). * * When launching an instance, you may provide the `securityAttributes` parameter in * [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/LaunchInstanceDetails) to manage security attributes via the instance, * or in the embedded [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/) to manage security attributes * via the VNIC directly, but not both. Providing `securityAttributes` in both locations will return a * 400 Bad Request response. * * To determine whether capacity is available for a specific shape before you create an instance, * use the [CreateComputeCapacityReport](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/ComputeCapacityReport/CreateComputeCapacityReport) * operation. * * ## Import * * Instances can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Core/instance:Instance test_instance "id" * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Instance; /** * (Updatable) Configuration options for the Oracle Cloud Agent software running on the instance. */ readonly agentConfig: pulumi.Output; /** * Whether Terraform creates and destroys the resource asynchronously. The default value is false. * * If `async` is true, all the creation and deletion of instances are asynchronous * * If `async` is false, all the creation and deletion of instances are synchronous as normal behavior * * > Please follow this guideline Terraform support asynchronous operation for more detail of this advanced option. */ readonly async: pulumi.Output; /** * (Updatable) Options for VM migration during infrastructure maintenance events and for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. */ readonly availabilityConfig: pulumi.Output; /** * The availability domain of the instance. Example: `Uocm:PHX-AD-1` */ readonly availabilityDomain: pulumi.Output; /** * The OCID of the attached boot volume. If the `sourceType` is `bootVolume`, this will be the same OCID as the `sourceId`. */ readonly bootVolumeId: pulumi.Output; /** * (Updatable) The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). */ readonly capacityReservationId: pulumi.Output; /** * The OCID of the cluster placement group of the instance. */ readonly clusterPlacementGroupId: pulumi.Output; /** * (Updatable) The OCID of the compartment. */ readonly compartmentId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [compute cluster](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. */ readonly computeClusterId: pulumi.Output; /** * (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see [Virtual Network Interface Cards (VNICs)](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). */ readonly createVnicDetails: pulumi.Output; /** * (Updatable) The OCID of the dedicated virtual machine host to place the instance on. */ readonly dedicatedVmHostId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the `metadata` object. * * They are distinguished from `metadata` fields in that these can be nested JSON objects (whereas `metadata` fields are string/string maps only). * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. * * Input in terraform is the same as metadata but allows nested metadata if you pass a valid JSON string as a value. See the example above. */ readonly extendedMetadata: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. * * If you do not specify the fault domain, the system selects one for you. * * To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. * * Example: `FAULT-DOMAIN-1` */ readonly faultDomain: pulumi.Output; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * Deprecated. Instead use `hostnameLabel` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). If you provide both, the values must match. * * @deprecated The 'hostname_label' field has been deprecated. Please use 'hostname_label under create_vnic_details' instead. */ readonly hostnameLabel: pulumi.Output; /** * Deprecated. Use `sourceDetails` with [InstanceSourceViaImageDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/InstanceSourceViaImageDetails) source type instead. If you specify values for both, the values must match. * * @deprecated The 'image' field has been deprecated. Please use 'source_details' instead. If both fields are specified, then 'source_details' will be used. */ readonly image: pulumi.Output; /** * The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch. */ readonly instanceConfigurationId: pulumi.Output; /** * (Updatable) Optional mutable instance options */ readonly instanceOptions: pulumi.Output; /** * This is an advanced option. * * When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process. * * If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call. * * The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot. * * If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive. * * For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). * * For more information about iPXE, see http://ipxe.org. */ readonly ipxeScript: pulumi.Output; /** * (Updatable) Whether to enable AI enterprise on the instance. */ readonly isAiEnterpriseEnabled: pulumi.Output; /** * Whether the instance’s OCPUs and memory are distributed across multiple NUMA nodes. */ readonly isCrossNumaNode: pulumi.Output; /** * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. Use this field only during create. To update use `isPvEncryptionInTransitEnabled` under `launchOptions` instead. */ readonly isPvEncryptionInTransitEnabled: pulumi.Output; /** * Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. * * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. * * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. */ readonly launchMode: pulumi.Output; /** * (Updatable) Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. */ readonly launchOptions: pulumi.Output; /** * Volume attachments to create as part of the launch instance operation. * * **Note:** This property is used for initial instance provisioning only. Updates to this property will not be supported. To update volume attachments, user should use `oci.Core.VolumeAttachment`. To update volume details, user should use `oci.Core.Volume` */ readonly launchVolumeAttachments: pulumi.Output; /** * (Updatable) List of licensing configurations associated with target launch values. */ readonly licensingConfigs: pulumi.Output; /** * (Updatable) Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance. * * A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to: * * Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks. * * Get information about the instance, including the custom metadata that you provide when you launch the instance. * * **Providing Cloud-Init Metadata** * * You can use the following metadata key names to provide information to Cloud-Init: * * **"sshAuthorizedKeys"** - Provide one or more public SSH keys to be included in the `~/.ssh/authorized_keys` file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the `authorizedKeys` file, as shown in the example below. * * **"userData"** - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html). * * **Metadata Example** * * ``` * "metadata" : { "quake_bot_level" : "Severe", "ssh_authorized_keys" : "ssh-rsa == rsa-key-20160227", "user_data" : "==" } * ``` * * **Getting Metadata on the Instance** * * To get information about your instance, connect to the instance using SSH and issue any of the following GET requests: * * ``` * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * ``` * * You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively. * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * Generic placement details field which is overloaded with bare metal host id or host group id based on the resource we are targeting to launch. */ readonly placementConstraintDetails: pulumi.Output; /** * (Updatable) The platform configuration requested for the instance. * * If you provide the parameter, the instance is created with the platform configuration that you specify. For any values that you omit, the instance uses the default configuration values for the `shape` that you specify. If you don't provide the parameter, the default values for the `shape` are used. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. * * For more information about shielded instances, see [Shielded Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/shielded-instances.htm). * * For more information about BIOS settings for bare metal instances, see [BIOS Settings for Bare Metal Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bios-settings.htm). */ readonly platformConfig: pulumi.Output; /** * Configuration options for preemptible instances. */ readonly preemptibleInstanceConfig: pulumi.Output; /** * (Optional) Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. */ readonly preserveBootVolume: pulumi.Output; readonly preserveDataVolumesCreatedAtLaunch: pulumi.Output; /** * The private IP address of instance VNIC. To set the private IP address, use the `privateIp` argument in create_vnic_details. */ readonly privateIp: pulumi.Output; /** * The public IP address of instance VNIC (if enabled). */ readonly publicIp: pulumi.Output; /** * The region that contains the availability domain the instance is running in. */ readonly region: pulumi.Output; /** * (Updatable) [Security attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` */ readonly securityAttributes: pulumi.Output<{ [key: string]: string; }>; /** * The lifecycle state of the `securityAttributes` */ readonly securityAttributesState: pulumi.Output; /** * (Updatable) The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. * * You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). */ readonly shape: pulumi.Output; /** * (Updatable) The shape configuration requested for the instance. * * If the parameter is provided, the instance is created with the resources that you specify. If some properties are missing or the entire parameter is not provided, the instance is created with the default configuration values for the `shape` that you specify. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. */ readonly shapeConfig: pulumi.Output; /** * (Updatable) */ readonly sourceDetails: pulumi.Output; /** * (Updatable) The target state for the instance. Could be set to RUNNING or STOPPED. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly state: pulumi.Output; /** * Deprecated. Instead use `subnetId` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). At least one of them is required; if you provide both, the values must match. * * @deprecated The 'subnet_id' field has been deprecated. Please use 'subnet_id under create_vnic_details' instead. */ readonly subnetId: pulumi.Output; /** * System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` */ readonly systemTags: pulumi.Output<{ [key: string]: string; }>; /** * The date and time the instance was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * The date and time the instance is expected to be stopped / started, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. Example: `2018-05-25T21:10:29.600Z` */ readonly timeMaintenanceRebootDue: pulumi.Output; readonly updateOperationConstraint: pulumi.Output; /** * Create a Instance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * (Updatable) Configuration options for the Oracle Cloud Agent software running on the instance. */ agentConfig?: pulumi.Input; /** * Whether Terraform creates and destroys the resource asynchronously. The default value is false. * * If `async` is true, all the creation and deletion of instances are asynchronous * * If `async` is false, all the creation and deletion of instances are synchronous as normal behavior * * > Please follow this guideline Terraform support asynchronous operation for more detail of this advanced option. */ async?: pulumi.Input; /** * (Updatable) Options for VM migration during infrastructure maintenance events and for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. */ availabilityConfig?: pulumi.Input; /** * The availability domain of the instance. Example: `Uocm:PHX-AD-1` */ availabilityDomain?: pulumi.Input; /** * The OCID of the attached boot volume. If the `sourceType` is `bootVolume`, this will be the same OCID as the `sourceId`. */ bootVolumeId?: pulumi.Input; /** * (Updatable) The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). */ capacityReservationId?: pulumi.Input; /** * The OCID of the cluster placement group of the instance. */ clusterPlacementGroupId?: pulumi.Input; /** * (Updatable) The OCID of the compartment. */ compartmentId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [compute cluster](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. */ computeClusterId?: pulumi.Input; /** * (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see [Virtual Network Interface Cards (VNICs)](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). */ createVnicDetails?: pulumi.Input; /** * (Updatable) The OCID of the dedicated virtual machine host to place the instance on. */ dedicatedVmHostId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the `metadata` object. * * They are distinguished from `metadata` fields in that these can be nested JSON objects (whereas `metadata` fields are string/string maps only). * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. * * Input in terraform is the same as metadata but allows nested metadata if you pass a valid JSON string as a value. See the example above. */ extendedMetadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. * * If you do not specify the fault domain, the system selects one for you. * * To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. * * Example: `FAULT-DOMAIN-1` */ faultDomain?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Deprecated. Instead use `hostnameLabel` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). If you provide both, the values must match. * * @deprecated The 'hostname_label' field has been deprecated. Please use 'hostname_label under create_vnic_details' instead. */ hostnameLabel?: pulumi.Input; /** * Deprecated. Use `sourceDetails` with [InstanceSourceViaImageDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/InstanceSourceViaImageDetails) source type instead. If you specify values for both, the values must match. * * @deprecated The 'image' field has been deprecated. Please use 'source_details' instead. If both fields are specified, then 'source_details' will be used. */ image?: pulumi.Input; /** * The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch. */ instanceConfigurationId?: pulumi.Input; /** * (Updatable) Optional mutable instance options */ instanceOptions?: pulumi.Input; /** * This is an advanced option. * * When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process. * * If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call. * * The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot. * * If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive. * * For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). * * For more information about iPXE, see http://ipxe.org. */ ipxeScript?: pulumi.Input; /** * (Updatable) Whether to enable AI enterprise on the instance. */ isAiEnterpriseEnabled?: pulumi.Input; /** * Whether the instance’s OCPUs and memory are distributed across multiple NUMA nodes. */ isCrossNumaNode?: pulumi.Input; /** * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. Use this field only during create. To update use `isPvEncryptionInTransitEnabled` under `launchOptions` instead. */ isPvEncryptionInTransitEnabled?: pulumi.Input; /** * Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. * * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. * * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. */ launchMode?: pulumi.Input; /** * (Updatable) Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. */ launchOptions?: pulumi.Input; /** * Volume attachments to create as part of the launch instance operation. * * **Note:** This property is used for initial instance provisioning only. Updates to this property will not be supported. To update volume attachments, user should use `oci.Core.VolumeAttachment`. To update volume details, user should use `oci.Core.Volume` */ launchVolumeAttachments?: pulumi.Input[] | undefined>; /** * (Updatable) List of licensing configurations associated with target launch values. */ licensingConfigs?: pulumi.Input; /** * (Updatable) Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance. * * A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to: * * Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks. * * Get information about the instance, including the custom metadata that you provide when you launch the instance. * * **Providing Cloud-Init Metadata** * * You can use the following metadata key names to provide information to Cloud-Init: * * **"sshAuthorizedKeys"** - Provide one or more public SSH keys to be included in the `~/.ssh/authorized_keys` file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the `authorizedKeys` file, as shown in the example below. * * **"userData"** - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html). * * **Metadata Example** * * ``` * "metadata" : { "quake_bot_level" : "Severe", "ssh_authorized_keys" : "ssh-rsa == rsa-key-20160227", "user_data" : "==" } * ``` * * **Getting Metadata on the Instance** * * To get information about your instance, connect to the instance using SSH and issue any of the following GET requests: * * ``` * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * ``` * * You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively. * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Generic placement details field which is overloaded with bare metal host id or host group id based on the resource we are targeting to launch. */ placementConstraintDetails?: pulumi.Input; /** * (Updatable) The platform configuration requested for the instance. * * If you provide the parameter, the instance is created with the platform configuration that you specify. For any values that you omit, the instance uses the default configuration values for the `shape` that you specify. If you don't provide the parameter, the default values for the `shape` are used. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. * * For more information about shielded instances, see [Shielded Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/shielded-instances.htm). * * For more information about BIOS settings for bare metal instances, see [BIOS Settings for Bare Metal Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bios-settings.htm). */ platformConfig?: pulumi.Input; /** * Configuration options for preemptible instances. */ preemptibleInstanceConfig?: pulumi.Input; /** * (Optional) Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. */ preserveBootVolume?: pulumi.Input; preserveDataVolumesCreatedAtLaunch?: pulumi.Input; /** * The private IP address of instance VNIC. To set the private IP address, use the `privateIp` argument in create_vnic_details. */ privateIp?: pulumi.Input; /** * The public IP address of instance VNIC (if enabled). */ publicIp?: pulumi.Input; /** * The region that contains the availability domain the instance is running in. */ region?: pulumi.Input; /** * (Updatable) [Security attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` */ securityAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The lifecycle state of the `securityAttributes` */ securityAttributesState?: pulumi.Input; /** * (Updatable) The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. * * You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). */ shape?: pulumi.Input; /** * (Updatable) The shape configuration requested for the instance. * * If the parameter is provided, the instance is created with the resources that you specify. If some properties are missing or the entire parameter is not provided, the instance is created with the default configuration values for the `shape` that you specify. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. */ shapeConfig?: pulumi.Input; /** * (Updatable) */ sourceDetails?: pulumi.Input; /** * (Updatable) The target state for the instance. Could be set to RUNNING or STOPPED. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ state?: pulumi.Input; /** * Deprecated. Instead use `subnetId` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). At least one of them is required; if you provide both, the values must match. * * @deprecated The 'subnet_id' field has been deprecated. Please use 'subnet_id under create_vnic_details' instead. */ subnetId?: pulumi.Input; /** * System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` */ systemTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The date and time the instance was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; /** * The date and time the instance is expected to be stopped / started, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. Example: `2018-05-25T21:10:29.600Z` */ timeMaintenanceRebootDue?: pulumi.Input; updateOperationConstraint?: pulumi.Input; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * (Updatable) Configuration options for the Oracle Cloud Agent software running on the instance. */ agentConfig?: pulumi.Input; /** * Whether Terraform creates and destroys the resource asynchronously. The default value is false. * * If `async` is true, all the creation and deletion of instances are asynchronous * * If `async` is false, all the creation and deletion of instances are synchronous as normal behavior * * > Please follow this guideline Terraform support asynchronous operation for more detail of this advanced option. */ async?: pulumi.Input; /** * (Updatable) Options for VM migration during infrastructure maintenance events and for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. */ availabilityConfig?: pulumi.Input; /** * The availability domain of the instance. Example: `Uocm:PHX-AD-1` */ availabilityDomain: pulumi.Input; /** * (Updatable) The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). */ capacityReservationId?: pulumi.Input; /** * The OCID of the cluster placement group of the instance. */ clusterPlacementGroupId?: pulumi.Input; /** * (Updatable) The OCID of the compartment. */ compartmentId: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [compute cluster](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. */ computeClusterId?: pulumi.Input; /** * (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see [Virtual Network Interface Cards (VNICs)](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). */ createVnicDetails?: pulumi.Input; /** * (Updatable) The OCID of the dedicated virtual machine host to place the instance on. */ dedicatedVmHostId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the `metadata` object. * * They are distinguished from `metadata` fields in that these can be nested JSON objects (whereas `metadata` fields are string/string maps only). * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. * * Input in terraform is the same as metadata but allows nested metadata if you pass a valid JSON string as a value. See the example above. */ extendedMetadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. * * If you do not specify the fault domain, the system selects one for you. * * To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. * * Example: `FAULT-DOMAIN-1` */ faultDomain?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Deprecated. Instead use `hostnameLabel` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). If you provide both, the values must match. * * @deprecated The 'hostname_label' field has been deprecated. Please use 'hostname_label under create_vnic_details' instead. */ hostnameLabel?: pulumi.Input; /** * Deprecated. Use `sourceDetails` with [InstanceSourceViaImageDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/InstanceSourceViaImageDetails) source type instead. If you specify values for both, the values must match. * * @deprecated The 'image' field has been deprecated. Please use 'source_details' instead. If both fields are specified, then 'source_details' will be used. */ image?: pulumi.Input; /** * The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch. */ instanceConfigurationId?: pulumi.Input; /** * (Updatable) Optional mutable instance options */ instanceOptions?: pulumi.Input; /** * This is an advanced option. * * When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process. * * If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call. * * The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot. * * If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive. * * For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). * * For more information about iPXE, see http://ipxe.org. */ ipxeScript?: pulumi.Input; /** * (Updatable) Whether to enable AI enterprise on the instance. */ isAiEnterpriseEnabled?: pulumi.Input; /** * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. Use this field only during create. To update use `isPvEncryptionInTransitEnabled` under `launchOptions` instead. */ isPvEncryptionInTransitEnabled?: pulumi.Input; /** * (Updatable) Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. */ launchOptions?: pulumi.Input; /** * Volume attachments to create as part of the launch instance operation. * * **Note:** This property is used for initial instance provisioning only. Updates to this property will not be supported. To update volume attachments, user should use `oci.Core.VolumeAttachment`. To update volume details, user should use `oci.Core.Volume` */ launchVolumeAttachments?: pulumi.Input[] | undefined>; /** * (Updatable) List of licensing configurations associated with target launch values. */ licensingConfigs?: pulumi.Input; /** * (Updatable) Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance. * * A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to: * * Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks. * * Get information about the instance, including the custom metadata that you provide when you launch the instance. * * **Providing Cloud-Init Metadata** * * You can use the following metadata key names to provide information to Cloud-Init: * * **"sshAuthorizedKeys"** - Provide one or more public SSH keys to be included in the `~/.ssh/authorized_keys` file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the `authorizedKeys` file, as shown in the example below. * * **"userData"** - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html). * * **Metadata Example** * * ``` * "metadata" : { "quake_bot_level" : "Severe", "ssh_authorized_keys" : "ssh-rsa == rsa-key-20160227", "user_data" : "==" } * ``` * * **Getting Metadata on the Instance** * * To get information about your instance, connect to the instance using SSH and issue any of the following GET requests: * * ``` * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ * ``` * * You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively. * * The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Generic placement details field which is overloaded with bare metal host id or host group id based on the resource we are targeting to launch. */ placementConstraintDetails?: pulumi.Input; /** * (Updatable) The platform configuration requested for the instance. * * If you provide the parameter, the instance is created with the platform configuration that you specify. For any values that you omit, the instance uses the default configuration values for the `shape` that you specify. If you don't provide the parameter, the default values for the `shape` are used. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. * * For more information about shielded instances, see [Shielded Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/shielded-instances.htm). * * For more information about BIOS settings for bare metal instances, see [BIOS Settings for Bare Metal Instances](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bios-settings.htm). */ platformConfig?: pulumi.Input; /** * Configuration options for preemptible instances. */ preemptibleInstanceConfig?: pulumi.Input; /** * (Optional) Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. */ preserveBootVolume?: pulumi.Input; preserveDataVolumesCreatedAtLaunch?: pulumi.Input; /** * (Updatable) [Security attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` */ securityAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. * * You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). */ shape?: pulumi.Input; /** * (Updatable) The shape configuration requested for the instance. * * If the parameter is provided, the instance is created with the resources that you specify. If some properties are missing or the entire parameter is not provided, the instance is created with the default configuration values for the `shape` that you specify. * * Each shape only supports certain configurable values. If the values that you provide are not valid for the specified `shape`, an error is returned. */ shapeConfig?: pulumi.Input; /** * (Updatable) */ sourceDetails?: pulumi.Input; /** * (Updatable) The target state for the instance. Could be set to RUNNING or STOPPED. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ state?: pulumi.Input; /** * Deprecated. Instead use `subnetId` in [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/). At least one of them is required; if you provide both, the values must match. * * @deprecated The 'subnet_id' field has been deprecated. Please use 'subnet_id under create_vnic_details' instead. */ subnetId?: pulumi.Input; updateOperationConstraint?: pulumi.Input; } //# sourceMappingURL=instance.d.ts.map