Deploys an Oracle Cloud Infrastructure compute instance — a virtual machine or bare metal host — with flexible shape sizing, primary VNIC networking, and cloud-init metadata support. Flex shapes allow precise allocation of OCPUs and memory, while optional configurations cover preemptible pricing, platform-level security (Secure Boot, TPM), and Oracle Cloud Agent management.
What Gets Created
When you deploy an OciComputeInstance resource, OpenMCF provisions:
Compute Instance — an oci_core_instance resource in the specified compartment and availability domain. The instance is created with the chosen shape, boots from the specified image or boot volume, and is attached to a subnet via its primary VNIC. Standard OpenMCF freeform tags are applied for resource tracking.
Prerequisites
OCI credentials configured via environment variables or OpenMCF provider config (API Key, Instance Principal, Security Token, Resource Principal, or OKE Workload Identity)
A compartment OCID where the instance will be created — literal value or reference to an OciCompartment resource
A subnet OCID for the primary VNIC — literal value or reference to an OciSubnet resource
An availability domain name in the target region (e.g., Ixxj:US-ASHBURN-AD-1)
A compute shape name (e.g., VM.Standard.E4.Flex, VM.Standard.A1.Flex, BM.Standard3.64)
An image OCID for the boot source, or an existing boot volume OCID to clone
This creates a 1-OCPU, 16 GB VM on the E4 Flex shape in the specified availability domain and subnet. The instance boots from the given image, receives a private IP from the subnet's CIDR, and inherits the subnet's public IP assignment policy. The instance ID, IP addresses, boot volume ID, and availability domain are exported as stack outputs.
Configuration Reference
Required Fields
Field
Type
Description
Validation
compartmentId
StringValueOrRef
OCID of the compartment where the instance will be created. Can reference an OciCompartment resource via valueFrom.
Required
availabilityDomain
string
Availability domain for instance placement (e.g., Ixxj:US-ASHBURN-AD-1). Changing this forces recreation.
Resource allocation for flex shapes. Required when the shape name contains "Flex". See shapeConfig fields.
metadata
map<string, string>
—
Key-value pairs passed to the instance. Common keys: ssh_authorized_keys (newline-separated public keys), user_data (base64-encoded cloud-init script).
faultDomain
string
Auto-distributed
Fault domain within the availability domain (e.g., FAULT-DOMAIN-1). OCI auto-distributes across fault domains when unspecified.
isPvEncryptionInTransitEnabled
bool
—
Enables in-transit encryption for paravirtualized boot and data volume attachments. Changing this forces recreation.
A private instance bootstrapped via cloud-init, secured by NSGs referenced from OpenMCF-managed resources. No public IP; the instance is accessible only through the private subnet:
A cost-optimized preemptible instance for fault-tolerant batch processing. OCI can reclaim the instance when capacity is needed; the boot volume is preserved for resuming work:
A production instance with platform security enabled — Secure Boot, Measured Boot, TPM, and memory encryption — plus IMDSv2-only access, in-transit encryption, and live migration preference:
After deployment, the following outputs are available in status.outputs:
Output
Type
Description
instance_id
string
OCID of the compute instance.
private_ip
string
Private IP address of the primary VNIC.
public_ip
string
Public IP address of the primary VNIC. Empty when no public IP is assigned.
boot_volume_id
string
OCID of the boot volume attached to the instance.
availability_domain
string
Availability domain where the instance was placed.
Related Components
OciCompartment — provides the compartment referenced by compartmentId via valueFrom
OciSubnet — provides the subnet referenced by createVnicDetails.subnetId via valueFrom
OciSecurityGroup — manages network security rules referenced by createVnicDetails.nsgIds via valueFrom
OciVcn — creates the virtual cloud network that subnets and security groups belong to
OciBlockVolume — attaches additional block storage to the instance
Next article
OCI Container Engine Cluster
OCI Container Engine Cluster Deploys an Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) cluster — a managed Kubernetes control plane with API server, etcd, scheduler, and controller manager. Supports basic and enhanced cluster types, VCN-native and flannel overlay CNI for pod networking, private or public API endpoints, OIDC authentication, KMS secrets encryption, and container image signature verification. Worker nodes are managed separately via OciContainerEngineNodePool....