Skip to main content

CDKTF bindings for Oracle Cloud Infrastructure

Project description

CDKTF Provider for Oracle Cloud Infrastructure (OCI)

This repository contains auto-generated CDKTF (Cloud Development Kit for Terraform) bindings for Oracle Cloud Infrastructure.

Features

  • 🚀 Auto-generated bindings from the official OCI Terraform provider
  • 📦 Multi-language support (TypeScript/JavaScript and Python)
  • 🔄 Automated updates via GitHub Actions when new OCI provider versions are released
  • 📝 Type-safe infrastructure code with full IDE support
  • 🎯 Automated publishing to NPM and PyPI registries

Installation

TypeScript/JavaScript

npm install @cdktf/provider-oci
# or
yarn add @cdktf/provider-oci

Python

pip install cdktf-provider-oci

Quick Start

TypeScript Example

import { Construct } from 'constructs';
import { App, TerraformStack } from 'cdktf';
import { OciProvider } from '@cdktf/provider-oci/lib/provider';
import { Instance } from '@cdktf/provider-oci/lib/instance';

class MyStack extends TerraformStack {
  constructor(scope: Construct, name: string) {
    super(scope, name);

    new OciProvider(this, 'oci', {
      region: 'us-ashburn-1',
      tenancyOcid: process.env.OCI_TENANCY_OCID,
      userOcid: process.env.OCI_USER_OCID,
      fingerprint: process.env.OCI_FINGERPRINT,
      privateKey: process.env.OCI_PRIVATE_KEY,
    });

    new Instance(this, 'example', {
      availabilityDomain: 'AD-1',
      compartmentId: process.env.OCI_COMPARTMENT_ID,
      shape: 'VM.Standard.E2.1.Micro',
      // ... other configuration
    });
  }
}

const app = new App();
new MyStack(app, 'oci-example');
app.synth();

Python Example

from constructs import Construct
from cdktf import App, TerraformStack
from cdktf_provider_oci import OciProvider, Instance

class MyStack(TerraformStack):
    def __init__(self, scope: Construct, name: str):
        super().__init__(scope, name)

        OciProvider(self, "oci",
            region="us-ashburn-1",
            tenancy_ocid=os.environ["OCI_TENANCY_OCID"],
            user_ocid=os.environ["OCI_USER_OCID"],
            fingerprint=os.environ["OCI_FINGERPRINT"],
            private_key=os.environ["OCI_PRIVATE_KEY"]
        )

        Instance(self, "example",
            availability_domain="AD-1",
            compartment_id=os.environ["OCI_COMPARTMENT_ID"],
            shape="VM.Standard.E2.1.Micro"
            # ... other configuration
        )

app = App()
MyStack(app, "oci-example")
app.synth()

Development

Prerequisites

  • Node.js 18+
  • Yarn
  • Python 3.8+ (for Python bindings)

Setup

# Install dependencies
yarn install

# Generate provider bindings
./scripts/generate-provider.sh

# Run tests
yarn test

# Build the project
yarn build

Project Structure

.
├── src/              # Source code for custom constructs
├── lib/              # Compiled JavaScript code
├── dist/             # Distribution packages
├── .gen/             # Generated provider bindings
├── scripts/          # Utility scripts
└── test/             # Test files

GitHub Actions Automation

This repository includes automated workflows:

  1. Daily Provider Updates: Checks for new OCI provider versions and creates PRs
  2. Build & Test: Runs on every push and pull request
  3. Release: Automatically publishes to NPM and PyPI on version tags
  4. Generate Bindings: Can be triggered manually to regenerate provider bindings

Setting up GitHub Secrets

To enable automated publishing, configure these secrets in your GitHub repository:

  • NPM_TOKEN: NPM automation token for publishing
  • TWINE_USERNAME: PyPI username (use __token__ for API tokens)
  • TWINE_PASSWORD: PyPI password or API token

See GITHUB_SECRETS_SETUP.md for detailed instructions.

Version Management

This project follows semantic versioning. The OCI provider version is tracked separately in provider-config.json.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Resources

Support

For issues and questions:

  • Open an issue in this repository
  • Check existing issues for solutions
  • Refer to the official OCI and CDKTF documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdktf_provider_oci-0.0.0.tar.gz (6.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdktf_provider_oci-0.0.0-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

File details

Details for the file cdktf_provider_oci-0.0.0.tar.gz.

File metadata

  • Download URL: cdktf_provider_oci-0.0.0.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cdktf_provider_oci-0.0.0.tar.gz
Algorithm Hash digest
SHA256 39e7f8a273cc8d158adbc581f12c8a4b1105d3b714f84c2e4df3295e7d0c1645
MD5 8ad9229f8d5e2933c389ea8ba2491f1d
BLAKE2b-256 710a42545c7b3f3b819a99d698688bf61d3130ae5884fa438761b85264a2f8ac

See more details on using hashes here.

File details

Details for the file cdktf_provider_oci-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cdktf_provider_oci-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e21959341123f139edf1bec2afac382104f38af1366988184d13482a0070bc0
MD5 fc18f9aad0ab980ba8f626f6fc119fc7
BLAKE2b-256 b63720e482e996a0318503f20824d2a9a40812a61aac92417d0a2dfe40ae43dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page