{"id":15156221,"url":"https://github.com/sudo-kraken/oci-free-terraform-stack","last_synced_at":"2026-01-20T07:07:35.024Z","repository":{"id":206473734,"uuid":"716970723","full_name":"sudo-kraken/oci-free-terraform-stack","owner":"sudo-kraken","description":"OCI Terraform Module: Automated deployment of OCI resources, including multiple compute instances, additional storage, and network setup, managed via GitHub Actions with Docker and Docker Compose integrations.","archived":false,"fork":false,"pushed_at":"2024-01-22T14:39:38.000Z","size":161,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T15:26:57.740Z","etag":null,"topics":["actions","docker","docker-compose","github-actions","iac","iac-module","oci","oci-terraform-modules","oracle-cloud","terraform","terraform-module","terraform-modules"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sudo-kraken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-10T09:09:06.000Z","updated_at":"2024-11-21T16:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"afacbd22-c777-40b8-baff-c380103e70fc","html_url":"https://github.com/sudo-kraken/oci-free-terraform-stack","commit_stats":{"total_commits":93,"total_committers":1,"mean_commits":93.0,"dds":0.0,"last_synced_commit":"b9ad09b307e7638beff8f77e70cb6d08973a2b2a"},"previous_names":["sudo-kraken/terraform-oci-free-forever-stack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudo-kraken%2Foci-free-terraform-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudo-kraken%2Foci-free-terraform-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudo-kraken%2Foci-free-terraform-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudo-kraken%2Foci-free-terraform-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sudo-kraken","download_url":"https://codeload.github.com/sudo-kraken/oci-free-terraform-stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247655220,"owners_count":20974145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","docker","docker-compose","github-actions","iac","iac-module","oci","oci-terraform-modules","oracle-cloud","terraform","terraform-module","terraform-modules"],"created_at":"2024-09-26T19:01:54.047Z","updated_at":"2026-01-20T07:07:35.017Z","avatar_url":"https://github.com/sudo-kraken.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/assets/logo.png\" align=\"center\" width=\"144px\" height=\"144px\"/\u003e\n\n### OCI Free Terraform Stack\n\n_An opinionated Terraform module for Oracle Cloud Infrastructure that provisions a complete free-tier stack including compute and networking. Ships with a ready-to-run GitHub Actions workflow._\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Terraform](https://img.shields.io/badge/Terraform-Required-623CE4?logo=terraform\u0026logoColor=white\u0026style=for-the-badge)](https://www.terraform.io/)\n[![Terraform Version](https://img.shields.io/badge/Terraform-1.6%2B-623CE4?logo=terraform\u0026logoColor=white\u0026style=for-the-badge)](https://www.terraform.io/)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/sudo-kraken/oci-free-terraform-stack?label=openssf%20scorecard\u0026style=for-the-badge)](https://scorecard.dev/viewer/?uri=github.com/sudo-kraken/oci-free-terraform-stack)\n\n\u003c/div\u003e\n\n## Contents\n\n- [Overview](#overview)\n- [Architecture at a glance](#architecture-at-a-glance)\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n  - [Secrets required](#secrets-required)\n- [Automated deployment with GitHub Actions](#automated-deployment-with-github-actions)\n  - [GitHub Action execution](#github-action-execution)\n  - [Accessing the instances](#accessing-the-instances)\n- [Quick start](#quick-start)\n- [Troubleshooting](#troubleshooting)\n- [Licence](#licence)\n- [Security](#security)\n- [Contributing](#contributing)\n- [Support](#support)\n\n## Overview\n\nThis module provisions an Oracle Cloud Infrastructure environment that fits the free-tier allowances. It creates compute, networking and storage so you can launch useful workloads at zero cost.\n\nThe stack includes:\n- **2x VM.Standard.E2.1.Micro** instances, each with **1 OCPU** and **1 GB RAM**\n- **1x VM.Standard.A1.Flex** instance with **4 OCPUs** and **24 GB RAM**, plus a **59 GB block volume**\n- A **Virtual Cloud Network** with subnets, security lists and an internet gateway\n\n\u003e [!NOTE]  \n\u003e All resources are defined to align with free-tier constraints where applicable. Always check your tenancy and region limits.\n\n## Architecture at a glance\n\n- Terraform module defines:\n  - VCN, subnets, security lists and internet gateway\n  - Three compute instances as listed above\n  - One block volume attached to the A1 Flex instance\n- Opinionated security lists to enable typical access\n- Ready-made GitHub Actions workflow to run Terraform from CI\n\n## Features\n\n- Free-tier friendly shapes and sizes\n- Complete baseline networking with internet access\n- Automated plan and apply from GitHub Actions\n- Clean-up on failure to help maintain a tidy tenancy\n\n## Prerequisites\n\n- Oracle Cloud Infrastructure account\n- Terraform 1.6 or newer\n- **OCI API credentials** stored as GitHub Secrets\n\n### Secrets required\n\n| Secret name | Description |\n|-------------|-------------|\n| `PAT_TOKEN` | Personal Access Token used by the pipeline to check out the repository |\n| `PKEY` | OCI SSH private key |\n| `TENANCY_OCID` | OCID of your tenancy |\n| `USER_OCID` | OCID of your user |\n| `FP` | Fingerprint for the user’s API key |\n| `SSH_PUB_KEY` | SSH public key added to the instances for access |\n\n## Automated deployment with GitHub Actions\n\nThe workflow **Execute OCI Pipeline** performs the following:\n\n- Checks out the repository to the GitHub runner\n- Sets up **Node.js** and the **Terraform CLI** environments\n- Configures the SSH private key and Terraform variables from **GitHub Secrets**\n- Initialises Terraform, creates a plan and applies it\n- On failure, automatically destroys provisioned resources to return to a clean state\n\n### GitHub Action execution\n\nThe root **`main.tf`** is the entry point used by the workflow. It wires the module, variables and provisioners. As part of instance initialisation it **updates packages** and installs **Docker** and **Docker Compose**.\n\n### Accessing the instances\n\nWhen the workflow completes successfully, the **public IPs** of instances are shown in the Terraform outputs. Connect using:\n\n- Username: `opc`  \n- Authentication: the SSH key you provided in `SSH_PUB_KEY`\n\n## Quick start\n\n1. **Fork or clone** this repository into your GitHub account.\n2. Create the **GitHub Secrets** listed above in your repository settings.\n3. Review `main.tf` and the module variables to confirm regions, compartments and any tags.\n4. Open the **Actions** tab, select **Execute OCI Pipeline**, provide any inputs and **run** it.\n5. On completion, use the outputs to **SSH** to the instances as `opc`.\n\n\u003e [!NOTE]  \n\u003e If you prefer local execution, you can run `terraform init`, `terraform plan` and `terraform apply` from your workstation once your OCI credentials are exported appropriately. The CI workflow remains the recommended path.\n\n## Troubleshooting\n\n- **Apply failed or timed out**  \n  Check the Actions logs for missing or incorrect secrets. Ensure the tenancy, compartment and region match your expectations.\n- **Cannot SSH**  \n  Verify that `SSH_PUB_KEY` matches your local private key and that security lists allow ingress from your IP.\n- **Quota or service limits**  \n  Free-tier entitlements and regional capacity can vary. Adjust regions or shapes if a resource cannot be created.\n\n## Licence\n\nThis project is licensed under the MIT Licence. See the [LICENCE](LICENCE) file for details.\n\n## Security\n\nIf you discover a security issue, please review and follow the guidance in [SECURITY.md](SECURITY.md), or open a private security-focused issue with minimal details and request a secure contact channel.\n\n## Contributing\n\nFeel free to open issues or submit pull requests if you have suggestions or improvements.  \nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Support\n\nOpen an [issue](/../../issues) with as much detail as possible, including your tenancy region, the workflow you ran and relevant Terraform logs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudo-kraken%2Foci-free-terraform-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudo-kraken%2Foci-free-terraform-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudo-kraken%2Foci-free-terraform-stack/lists"}