Registry / devops / pulumi-oci

pulumi-oci

JSON →
library4.10.0pypypi✓ verified 87d ago

A Pulumi package for creating and managing Oracle Cloud Infrastructure (OCI) resources. Version 4.10.0 is the latest, released on an irregular cadence aligned with the upstream Terraform provider bridge updates.

pip install pulumi-oci
INSTALL
IMPORT
SIG · PULUMI-OCI
P
pulumi-oci
devopspythonv4.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

oci
✓ import pulumi_oci as oci
✗ import oci
The package name is pulumi_oci, not oci (which is the Oracle OCI SDK).
Identity
✓ from pulumi_oci import Identity
✗ from oci import Identity
Wrong top-level package leads to ModuleNotFoundError.

Creates a VCN in Oracle Cloud Infrastructure using the OCI provider. Replace config values with your OCI credentials.

import pulumi import pulumi_oci as oci config = pulumi.Config() user_ocid = config.require('userOcid') fingerprint = config.require('fingerprint') private_key = config.require_secret('privateKey') tenancy_ocid = config.require('tenancyOcid') region = config.require('region') provider = oci.Provider('oci-provider', user_ocid=user_ocid, fingerprint=fingerprint, private_key=private_key, tenancy_ocid=tenancy_ocid, region=region ) vcn = oci.core.Vcn('my-vcn', cidr_blocks=['10.0.0.0/16'], compartment_id=config.require('compartmentOcid'), opts=pulumi.ResourceOptions(provider=provider) ) pulumi.export('vcn_id', vcn.id)
Debug
Known issues
gotchaImport using 'import pulumi_oci as oci' or 'from pulumi_oci import ...'. The plain 'oci' package is Oracle's official SDK, not the Pulumi provider.
fix
Always use 'pulumi_oci' as the import name.
affects: all
deprecatedOlder versions (pre-4.0) used a different resource module structure. Resources may have moved or been renamed.
fix
Check the provider documentation for the correct resource paths, e.g., 'oci_core_vcn' became 'oci.core.Vcn'.
affects: >=4.0.0
gotchaThe provider requires explicit configuration via Pulumi config or a Provider resource. Environment variables are not automatically read.
fix
Set config values via 'pulumi config set' or instantiate a 'pulumi_oci.Provider' resource with required arguments.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'oci'
Attempted to import the wrong package; the correct package is 'pulumi_oci'.
fix
Install the correct package: pip install pulumi-oci, then import as import pulumi_oci as oci.
pulumi_oci.exceptions.InvalidCredentialsError
The provider could not authenticate with OCI due to missing or incorrect credentials in configuration.
fix
Ensure you have set the required configuration values: userOcid, fingerprint, privateKey, tenancyOcid, region. Use 'pulumi config set' or a Provider resource.
Upgrade
Version history
4.10.0latest on PyPI · released May 7, 2026
Audit
Dependencies
pulumirequiredCore Pulumi SDK is required for all Pulumi programs.
Agent activity
19 hits · last 30 days
node
18
Resources
pulumi-oci — pip install pulumi-oci · libregistry