OpenMCF logoOpenMCF

Loading...

OCI Autonomous Database

Deploys an Oracle Cloud Infrastructure Autonomous Database — a fully managed, self-driving database service supporting OLTP (ATP), data warehouse (ADW), JSON (AJD), APEX, and lakehouse workloads. The component handles compute and storage sizing, networking, encryption, Data Guard, and backup retention through a single manifest.

What Gets Created

When you deploy an OciAutonomousDatabase resource, OpenMCF provisions:

  • Autonomous Database — an oci_database_autonomous_database resource in the specified compartment. The database type is determined by dbWorkload (OLTP, DW, AJD, APEX, or LH). Freeform tags are applied automatically from metadata labels, environment, and organization.
  • Connection Strings — three prioritized connection strings (high, medium, low) are exported as stack outputs for use by application workloads.
  • Private Endpoint (conditional) — when subnetId is set, the database is provisioned with a private endpoint in the specified subnet, disabling public secure access. NSGs and IP access lists can further restrict connectivity.
  • Customer-Managed Encryption (conditional) — when kmsKeyId and vaultId are set, Transparent Data Encryption uses the specified KMS key instead of Oracle-managed keys.

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 autonomous database will be created — either a literal value or a reference to an OciCompartment resource
  • An admin password or a Vault secret OCID containing the password — one of the two is required for the database administrator account

Quick Start

Create a file adb.yaml:

apiVersion: oci.openmcf.org/v1
kind: OciAutonomousDatabase
metadata:
  name: my-adb
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.OciAutonomousDatabase.my-adb
spec:
  compartmentId:
    value: "ocid1.compartment.oc1..example"
  dbName: "myatp"
  dbWorkload: oltp
  computeModel: ecpu
  computeCount: 2
  dataStorageSizeInTbs: 1
  adminPassword: "ExamplePass#2026"

Deploy:

openmcf apply -f adb.yaml

This creates a serverless Autonomous Transaction Processing database with 2 ECPUs and 1 TB of storage. The database OCID, connection strings, and service console URL are exported as stack outputs.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
compartmentIdStringValueOrRefOCID of the compartment where the autonomous database will be created. Can reference an OciCompartment resource via valueFrom.Required
dbNamestringThe database name. Must be alphanumeric, begin with a letter, and be unique within the tenancy. Cannot be changed after creation.1–30 characters, pattern ^[a-zA-Z][a-zA-Z0-9]*$

Optional Fields

FieldTypeDefaultDescription
displayNamestringmetadata.nameHuman-readable name shown in the OCI Console. Falls back to metadata.name if not provided.
dbWorkloadenumdb_workload_unspecifiedWorkload type: oltp (ATP), dw (ADW), ajd (JSON Database), apex (APEX), lh (Lakehouse). Determines optimizer behavior and available features.
dbVersionstringlatestOracle Database version (e.g. "19c", "23ai", "26ai"). When omitted, the latest available version is used.
databaseEditionenumdatabase_edition_unspecifiedstandard_edition or enterprise_edition. Enterprise includes partitioning, compression, and advanced security.
licenseModelenumlicense_model_unspecifiedbring_your_own_license or license_included. AJD and APEX workloads always use LICENSE_INCLUDED regardless of this setting.
characterSetstringAL32UTF8Character set for the database. Cannot be changed after creation.
ncharacterSetstringAL16UTF16National character set. Valid values: AL16UTF16, UTF8. Cannot be changed after creation.
computeModelenumcompute_model_unspecifiedecpu (recommended) or ocpu (legacy).
computeCountfloat—Number of compute units (ECPUs or OCPUs). Minimum 2 ECPUs for ECPU model.
dataStorageSizeInTbsint32—Maximum storage in terabytes. For serverless deployments. Mutually exclusive with dataStorageSizeInGb.
dataStorageSizeInGbint32—Maximum storage in gigabytes. For dedicated Exadata deployments needing finer granularity. Mutually exclusive with dataStorageSizeInTbs.
isAutoScalingEnabledbool—When true, CPU auto-scaling allows up to 3x the provisioned compute count during demand spikes.
isAutoScalingForStorageEnabledbool—When true, storage auto-scaling automatically expands storage when usage reaches the threshold.
adminPasswordstring—Administrator password. 12–30 characters, must contain uppercase, lowercase, and numeric. Cannot contain "admin" or double-quote. Mutually exclusive with secretId.
secretIdStringValueOrRef—OCID of a Vault secret containing the admin password. Use instead of adminPassword for production. Mutually exclusive with adminPassword.
secretVersionNumberint32latestVersion of the Vault secret. Only applicable when secretId is set.
subnetIdStringValueOrRef—OCID of the subnet for private endpoint access. When set, public access is disabled. Can reference an OciSubnet resource.
nsgIdsStringValueOrRef[]—OCIDs of network security groups for the private endpoint. Maximum 5. Only applicable when subnetId is set.
privateEndpointLabelstring—DNS label prefix for the private endpoint FQDN.
privateEndpointIpstring—Specific private IP for the endpoint within the subnet. Auto-assigned when omitted.
whitelistedIpsstring[]—Client IP access control list. Each entry can be an IP address, CIDR block, or VCN OCID.
isMtlsConnectionRequiredbool—When true, only mutual TLS connections are allowed. When false, both TLS and mTLS are accepted.
isAccessControlEnabledbool—When true, enables database-level access control. For Exadata Cloud@Customer deployments.
kmsKeyIdStringValueOrRef—OCID of the KMS key for Transparent Data Encryption. When omitted, Oracle-managed encryption is used.
vaultIdStringValueOrRef—OCID of the OCI Vault containing the KMS key. Required when kmsKeyId is set.
isDedicatedbool—When true, uses dedicated Exadata infrastructure (requires autonomousContainerDatabaseId). Cannot be changed after creation.
isFreeTierbool—When true, provisions an Always Free database with limited compute and storage. Reclaimed after extended inactivity.
isDevTierbool—When true, provisions a Developer tier database at reduced cost for development and testing.
autonomousContainerDatabaseIdStringValueOrRef—OCID of the autonomous container database for dedicated deployments. Required when isDedicated is true.
backupRetentionPeriodInDaysint32service defaultNumber of days to retain automatic backups.
isLocalDataGuardEnabledbool—When true, enables local Autonomous Data Guard. A standby is provisioned in a different availability domain within the same region.
autonomousMaintenanceScheduleTypeenummaintenance_schedule_type_unspecifiedearly (patches sooner) or regular (standard Oracle schedule).
customerContactsCustomerContact[]—Contact email addresses for operational notifications. Each entry has an email field.

Examples

Basic ATP Database

A serverless Autonomous Transaction Processing database for a development workload:

apiVersion: oci.openmcf.org/v1
kind: OciAutonomousDatabase
metadata:
  name: dev-atp
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.OciAutonomousDatabase.dev-atp
spec:
  compartmentId:
    value: "ocid1.compartment.oc1..example"
  dbName: "devatp"
  dbWorkload: oltp
  computeModel: ecpu
  computeCount: 2
  dataStorageSizeInTbs: 1
  adminPassword: "DevPass#2026abc"

ADW for Analytics

An Autonomous Data Warehouse with BYOL licensing and auto-scaling for analytic workloads:

apiVersion: oci.openmcf.org/v1
kind: OciAutonomousDatabase
metadata:
  name: analytics-adw
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: staging.OciAutonomousDatabase.analytics-adw
spec:
  compartmentId:
    value: "ocid1.compartment.oc1..example"
  dbName: "analyticsadw"
  dbWorkload: dw
  computeModel: ecpu
  computeCount: 4
  dataStorageSizeInTbs: 2
  licenseModel: bring_your_own_license
  isAutoScalingEnabled: true
  adminPassword: "AnalyticsPass#2026"

Production ATP with Private Endpoint and Data Guard

A production-grade ATP database with private networking, Vault-managed credentials, customer-managed encryption, Data Guard, and maintenance scheduling:

apiVersion: oci.openmcf.org/v1
kind: OciAutonomousDatabase
metadata:
  name: prod-atp
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: acme-corp
    pulumi.openmcf.org/project: prod-databases
    pulumi.openmcf.org/stack.name: prod.OciAutonomousDatabase.prod-atp
  env: prod
  org: acme
spec:
  compartmentId:
    valueFrom:
      kind: OciCompartment
      name: prod-compartment
      fieldPath: status.outputs.compartmentId
  dbName: "prodatp"
  displayName: "Production ATP"
  dbWorkload: oltp
  dbVersion: "23ai"
  databaseEdition: enterprise_edition
  computeModel: ecpu
  computeCount: 8
  dataStorageSizeInTbs: 5
  licenseModel: bring_your_own_license
  isAutoScalingEnabled: true
  isAutoScalingForStorageEnabled: true
  secretId:
    value: "ocid1.vaultsecret.oc1..example"
  subnetId:
    valueFrom:
      kind: OciSubnet
      name: prod-db-subnet
      fieldPath: status.outputs.subnetId
  nsgIds:
    - valueFrom:
        kind: OciSecurityGroup
        name: prod-db-nsg
        fieldPath: status.outputs.networkSecurityGroupId
  privateEndpointLabel: "prodatp"
  isMtlsConnectionRequired: true
  kmsKeyId:
    value: "ocid1.key.oc1..example"
  vaultId:
    value: "ocid1.vault.oc1..example"
  isLocalDataGuardEnabled: true
  backupRetentionPeriodInDays: 30
  autonomousMaintenanceScheduleType: regular
  customerContacts:
    - email: "dba-team@acme.com"
    - email: "oncall@acme.com"

Always Free Tier

An Always Free ATP database for experimentation — no cost, limited resources:

apiVersion: oci.openmcf.org/v1
kind: OciAutonomousDatabase
metadata:
  name: free-atp
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.OciAutonomousDatabase.free-atp
spec:
  compartmentId:
    value: "ocid1.compartment.oc1..example"
  dbName: "freeatp"
  dbWorkload: oltp
  isFreeTier: true
  adminPassword: "FreePass#2026abc"

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
autonomousDatabaseIdstringOCID of the autonomous database
connectionStringHighstringHigh-priority connection string for latency-sensitive workloads
connectionStringMediumstringMedium-priority connection string for typical application workloads
connectionStringLowstringLow-priority connection string for batch and background workloads
serviceConsoleUrlstringURL of the OCI Service Console for this database
privateEndpointstringPrivate endpoint IP address. Empty when the database is not configured with a private endpoint.

Related Components

  • OciCompartment — provides the compartment referenced by compartmentId via valueFrom
  • OciSubnet — provides the subnet for private endpoint access via subnetId
  • OciSecurityGroup — provides NSGs for the private endpoint via nsgIds
  • OciVcn — the VCN containing the subnet used for private endpoint access

Next article

OCI Bastion

OCI Bastion Deploys an Oracle Cloud Infrastructure Bastion — a managed SSH gateway that provides secure, time-limited access to resources in private subnets without requiring a public IP on the target. Supports managed SSH sessions, port forwarding, and optional DNS proxy (FQDN and SOCKS5) for FQDN-based target resolution. What Gets Created When you deploy an OciBastion resource, OpenMCF provisions: Bastion — a bastion.Bastion resource (type STANDARD) in the specified compartment with a private...
Read next article
Presets
3 ready-to-deploy configurationsView presets →