{"id":51116577,"url":"https://github.com/oracle-devrel/terraform-oci-arch-fn-app","last_synced_at":"2026-06-24T22:30:38.229Z","repository":{"id":45878394,"uuid":"431605609","full_name":"oracle-devrel/terraform-oci-arch-fn-app","owner":"oracle-devrel","description":"Terraform code to deploy an event-triggered serverless function","archived":false,"fork":false,"pushed_at":"2025-01-21T20:13:27.000Z","size":130,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-21T14:40:37.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-devrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-24T19:30:58.000Z","updated_at":"2025-01-21T20:13:31.000Z","dependencies_parsed_at":"2024-05-16T17:28:59.400Z","dependency_job_id":"5d8b1f7c-7aa8-47c6-9f7a-a66dc9fed8a7","html_url":"https://github.com/oracle-devrel/terraform-oci-arch-fn-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"oracle-devrel/repo-template","purl":"pkg:github/oracle-devrel/terraform-oci-arch-fn-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-devrel%2Fterraform-oci-arch-fn-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-devrel%2Fterraform-oci-arch-fn-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-devrel%2Fterraform-oci-arch-fn-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-devrel%2Fterraform-oci-arch-fn-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-devrel","download_url":"https://codeload.github.com/oracle-devrel/terraform-oci-arch-fn-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-devrel%2Fterraform-oci-arch-fn-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34752465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-24T22:30:38.143Z","updated_at":"2026-06-24T22:30:38.213Z","avatar_url":"https://github.com/oracle-devrel.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-oci-arch-fn-app\n\nOracle Functions is a serverless, highly scalable, fully managed Functions-as-a-Service platform built on Oracle Cloud Infrastructure and powered by the open-source Fn Project engine. Developers can use Oracle Functions to write and deploy code that delivers business value without worrying about provisioning or managing the underlying infrastructure. Oracle Functions is container-native, with functions packaged as Docker container images.\n\nThis reference architecture shows how you can use a serverless function to in response to cloud events. \n\nThe architecture diagram shows the data flow. When files are uploaded to a specific bucket in Oracle Cloud Infrastructure Object Storage, the Events service is triggered. The emitted event invokes a function, which extracts metadata from the uploaded files and loads the data into a different bucket in Oracle Cloud Infrastructure Object Storage.\n\nFor details of the architecture, see [_Deploy an event-triggered serverless application_](https://docs.oracle.com/en/solutions/event-triggered-serverless-app/index.html)\n\n## Prerequisites\n\n- Permission to `manage` the following types of resources in your Oracle Cloud Infrastructure tenancy: `vcns`, `internet-gateways`, `route-tables`, `security-lists`, `serviceconnectors`, `buckets`, `subnets`, and `functions`.\n\n- Quota to create the following resources: 1 VCN, 1 subnets, 1 Internet Gateway, 1 route rules, 1 function, 1 service connector, 2 buckets.\n\nIf you don't have the required permissions and quota, contact your tenancy administrator. See [Policy Reference](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Reference/policyreference.htm), [Service Limits](https://docs.cloud.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm), [Compartment Quotas](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcequotas.htm).\n\n## Deploy Using Oracle Resource Manager\n\n1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home\u0026zipUrl=https://github.com/oracle-devrel/terraform-oci-arch-fn-app/releases/latest/download/terraform-oci-arch-fn-app-stack-latest.zip)\n\n    If you aren't already signed in, when prompted, enter the tenancy and user credentials.\n\n2. Review and accept the terms and conditions.\n\n3. Select the region where you want to deploy the stack.\n\n4. Follow the on-screen prompts and instructions to create the stack.\n\n5. After creating the stack, click **Terraform Actions**, and select **Plan**.\n\n6. Wait for the job to be completed, and review the plan.\n\n    To make any changes, return to the Stack Details page, click **Edit Stack**, and make the required changes. Then, run the **Plan** action again.\n\n7. If no further changes are necessary, return to the Stack Details page, click **Terraform Actions**, and select **Apply**.\n\n## Deploy Using the Terraform CLI\n\n### Clone the Module\nNow, you'll want a local copy of this repo. You can make that with the commands:\n\n    git clone https://github.com/oracle-devrel/terraform-oci-arch-fn-app.git\n    cd terraform-oci-arch-fn-app\n    ls\n\n### Prerequisites\nFirst off, you'll need to do some pre-deploy setup for Docker and Fn Project inside your machine:\n\n```\nsudo su -\nyum update\nyum install yum-utils\nyum-config-manager --enable *addons\nyum install docker-engine\ngroupadd docker\nservice docker restart\nusermod -a -G docker opc\nchmod 666 /var/run/docker.sock\nexit\ncurl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh\nexit\n```\n  \n### Set Up and Configure Terraform\n\n1. Complete the prerequisites described [here](https://github.com/cloud-partners/oci-prerequisites).\n\n2. Create a `terraform.tfvars` file, and specify the following variables:\n\n```\n# Authentication\ntenancy_ocid         = \"\u003ctenancy_ocid\u003e\"\nuser_ocid            = \"\u003cuser_ocid\u003e\"\nfingerprint          = \"\u003cfinger_print\u003e\"\nprivate_key_path     = \"\u003cpem_private_key_path\u003e\"\n\n# Region\nregion = \"\u003coci_region\u003e\"\n\n# Compartment\ncompartment_ocid = \"\u003ccompartment_ocid\u003e\"\n\n# OCIR\nocir_user_name         = \"\u003cocir_user_name\u003e\"\nocir_user_password     = \"\u003cocir_user_password\u003e\"\n````\n\n### Create the Resources\nRun the following commands:\n\n    terraform init\n    terraform plan\n    terraform apply\n\n### Test the stack \n\nYou can test the stack by uploading files into the first bucket. If event emission will be successful, the function should be executed, metadata is extracted from the uploaded files and the function output is stored to the second bucket, function-output-bucket.  \nWithin the automated deployment, a random id tag is appended to the bucket names. This is visible in the Terraform output (sample below).\n\n```\nOutputs:\n\nbuckets_created = \"bucket-44ac, function-output-bucket-44ac\"\n\n````\n\n### Destroy the Deployment\nWhen you no longer need the deployment, you can run this command to destroy the resources:\n\n    terraform destroy\n\n## Deploy as a module\nYou can utilize this repository as remote module, providing the necessary inputs:\n\n```\nmodule \"oci-arch-fn-app\" {\n  source             = \"github.com/oracle-devrel/terraform-oci-arch-fn-app\"\n  tenancy_ocid       = \"\u003ctenancy_ocid\u003e\"\n  user_ocid          = \"\u003cuser_ocid\u003e\"\n  fingerprint        = \"\u003cuser_ocid\u003e\"\n  region             = \"\u003coci_region\u003e\"\n  private_key_path   = \"\u003cprivate_key_path\u003e\"\n  compartment_ocid   = \"\u003ccompartment_ocid\u003e\"\n  ocir_user_name     = \"\u003cocir_user_name\u003e\"\n  ocir_user_password = \"\u003cocir_user_password\u003e\"\n}\n```\n\nIt is possible to deploy this architecture using an existing VCN and public subnet. Please refer to the [examples](https://github.com/oracle-devrel/terraform-oci-arch-fn-app/tree/main/examples/) folder.\n\n## Architecture Diagram\n\n![](./images/fn-app.png)\n\n## Contributing\nThis project is open source.  Please submit your contributions by forking this repository and submitting a pull request!  Oracle appreciates any contributions that are made by the open source community.\n\n### Attribution \u0026 Credits\nInitially, this project was created and distributed in [GitHub Oracle QuickStart space](https://github.com/oracle-quickstart/oci-redis). For that reason, we would like to thank all the involved contributors enlisted below:\n- Kartik Hedge (https://github.com/KartikShrikantHegde)\n- Lukasz Feldman (https://github.com/lfeldman)\n- Ben Lackey (https://github.com/benofben)\n\n## License\nCopyright (c) 2024 Oracle and/or its affiliates.\n\nLicensed under the Universal Permissive License (UPL), Version 1.0.\n\nSee [LICENSE](LICENSE.txt) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-devrel%2Fterraform-oci-arch-fn-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-devrel%2Fterraform-oci-arch-fn-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-devrel%2Fterraform-oci-arch-fn-app/lists"}