| name | oraclecloud-ci-integration |
| description | Configure CI/CD pipelines for OCI with Terraform and GitHub Actions.
Use when setting up automated infrastructure deployments, running Terraform plans in CI, or configuring OCI authentication for GitHub Actions.
Trigger with "oraclecloud ci", "oci terraform ci", "oci github actions", "oracle cloud ci integration".
|
| allowed-tools | Read, Write, Edit, Bash(pip:*), Bash(terraform:*), Grep |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","oraclecloud","oci"] |
| compatibility | Designed for Claude Code |
Oracle Cloud CI Integration
Overview
Set up GitHub Actions workflows that authenticate to OCI, run Terraform plans, and execute tests against OCI services. The OCI Terraform provider has known bugs — notably ResourcePrincipal forcing the wrong region (#1761) — that require specific workarounds. This skill provides battle-tested CI patterns that avoid those pitfalls.
Purpose: Get a working CI pipeline that authenticates to OCI, runs Terraform safely, and tests OCI-dependent code without flaky failures.
Prerequisites
- OCI tenancy with an API signing key configured in
~/.oci/config
- Terraform >= 1.5 and the OCI provider (
oracle/oci)
- GitHub repository with Actions enabled
- GitHub Secrets configured:
OCI_USER_OCID, OCI_FINGERPRINT, OCI_TENANCY_OCID, OCI_REGION, OCI_PRIVATE_KEY (PEM contents, base64-encoded)
- Python 3.8+ with
pip install oci for SDK-based tests
Instructions
Step 1: Configure GitHub Secrets for OCI Auth
OCI API key authentication requires five values. Store them as GitHub repository secrets:
base64 -w 0 ~/.oci/oci_api_key.pem
The remaining secrets come from your ~/.oci/config file: user, fingerprint, tenancy, and region.
Step 2: GitHub Actions Workflow with Terraform
Create .github/workflows/oci-terraform.yml:
name: OCI Terraform
on:
push:
branches: [main]
pull_request:
env:
TF_VAR_tenancy_ocid: ${{