{"id":20839155,"url":"https://github.com/timoa/terraform-oci-module-example","last_synced_at":"2025-03-12T10:09:43.606Z","repository":{"id":37472914,"uuid":"484505650","full_name":"timoa/terraform-oci-module-example","owner":"timoa","description":"A Terraform module uses as an example to start new Oracle Cloud Infrastructure Terraform module. It includes all the automation (versioning, providers update, lint, security) and best practices from HashiCorp","archived":false,"fork":false,"pushed_at":"2025-03-09T00:54:43.000Z","size":208,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T01:27:49.520Z","etag":null,"topics":["managed-by-terraform","oci","oracle-cloud-infrastructure","renovate","semantic-release","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://timoa.com","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timoa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-22T16:44:31.000Z","updated_at":"2025-01-20T06:29:47.000Z","dependencies_parsed_at":"2023-02-09T19:30:28.262Z","dependency_job_id":"c3244946-eb18-4d45-9cc9-47360bf1936f","html_url":"https://github.com/timoa/terraform-oci-module-example","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoa%2Fterraform-oci-module-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoa%2Fterraform-oci-module-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoa%2Fterraform-oci-module-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoa%2Fterraform-oci-module-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timoa","download_url":"https://codeload.github.com/timoa/terraform-oci-module-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243196663,"owners_count":20251861,"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":["managed-by-terraform","oci","oracle-cloud-infrastructure","renovate","semantic-release","terraform","terraform-module"],"created_at":"2024-11-18T01:12:30.130Z","updated_at":"2025-03-12T10:09:43.584Z","avatar_url":"https://github.com/timoa.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Module Oracle Cloud Infrastructure example\n\n[![Latest Release][release-badge]][release-url]\n[![Build Status][github-badge]][github-url]\n[![License][license-badge]][license-url]\n\nA Terraform module uses as a template to start new module.\n\nIt includes all the automation (versioning, providers update, lint, security) and best practices from HashiCorp.\n\n* [Pre-commit][pre-commit-url]: enforce checks on the module before commit\n* [Semantic Release][semantic-release-url]: automate the release and version process\n* [Reviewdog][reviewdog-url]: automate the review process with per code line comments (TFLint \u0026 TFSec checks)\n* [Renovate][renovate-url]: automate the dependency management (update provider version, etc.)\n* [ShiftLeft SCAN][shiftleft-scan-url]: security audit tool to detect security flaws in application and infrastructure code\n\n## Usage\n\n### OCI Authentication\n\nYou can use a session token when developing on your local machine,\n but for usage with Terraform Cloud or other CI/CD, you need to set\n environment variables based on the generated `~/.oci/config` file,\n to use the API Key authentication.\n\n\u003e An OCI session-token is valid only one hour and not suitable for CI/CD.\n\n```bash\noci session authenticate\n```\n\nOpen the OCI config file to fill the required environment variables\n for the API Key Authentication:\n\n```bash\nnano ~/.oci/config\n```\n\nAdd your credentials into your `~/.zprofile` or `~/.bash_profile` file:\n\n```bash\n# Oracle Cloud Infrastructure\nexport TF_VAR_tenancy_ocid=\"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TF_VAR_user_ocid=\"ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TF_VAR_fingerprint=\"xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\"\nexport TF_VAR_private_key=$(cat /home/xxxx/.oci/oci_api_key.pem)\n```\n\n### Integrate the module into your Terraform project\n\nIf you want to use this module inside your project, you can use the following code (change the tag to match the latest version):\n\n```bash\nmodule \"module-template\" {\n  source = \"git::https://github.com/timoa/terraform-oci-module-example.git?ref=tags/0.2.1\"\n\n  # Required\n  region    = \"uk-london-1\"\n\n  # Optional\n  namespace = \"my-project\"\n  stage     = \"prod\"\n}\n```\n\n### Output example\n\n```bash\nterraform init\nterraform plan\n```\n\n```bash\nChanges to Outputs:\n  + regions = [\n    + {\n        + key  = \"AMS\"\n        + name = \"eu-amsterdam-1\"\n      },\n    + {\n        + key  = \"ARN\"\n        + name = \"eu-stockholm-1\"\n      },\n    + {\n        + key  = \"AUH\"\n        + name = \"me-abudhabi-1\"\n      },\n    + {\n        + key  = \"BOM\"\n        + name = \"ap-mumbai-1\"\n      },\n    + {\n        + key  = \"CWL\"\n        + name = \"uk-cardiff-1\"\n      },\n    + {\n        + key  = \"DXB\"\n        + name = \"me-dubai-1\"\n      },\n    + {\n        + key  = \"FRA\"\n        + name = \"eu-frankfurt-1\"\n      },\n    + {\n        + key  = \"GRU\"\n        + name = \"sa-saopaulo-1\"\n      },\n    + {\n        + key  = \"HYD\"\n        + name = \"ap-hyderabad-1\"\n      },\n    + {\n        + key  = \"IAD\"\n        + name = \"us-ashburn-1\"\n      },\n    + {\n        + key  = \"ICN\"\n        + name = \"ap-seoul-1\"\n      },\n    + {\n        + key  = \"JED\"\n        + name = \"me-jeddah-1\"\n      },\n    + {\n        + key  = \"JNB\"\n        + name = \"af-johannesburg-1\"\n      },\n    + {\n        + key  = \"KIX\"\n        + name = \"ap-osaka-1\"\n      },\n    + {\n        + key  = \"LHR\"\n        + name = \"uk-london-1\"\n      },\n    + {\n        + key  = \"LIN\"\n        + name = \"eu-milan-1\"\n      },\n    + {\n        + key  = \"MEL\"\n        + name = \"ap-melbourne-1\"\n      },\n    + {\n        + key  = \"MRS\"\n        + name = \"eu-marseille-1\"\n      },\n    + {\n        + key  = \"MTZ\"\n        + name = \"il-jerusalem-1\"\n      },\n    + {\n        + key  = \"NRT\"\n        + name = \"ap-tokyo-1\"\n      },\n    + {\n        + key  = \"PHX\"\n        + name = \"us-phoenix-1\"\n      },\n    + {\n        + key  = \"SCL\"\n        + name = \"sa-santiago-1\"\n      },\n    + {\n        + key  = \"SIN\"\n        + name = \"ap-singapore-1\"\n      },\n    + {\n        + key  = \"SJC\"\n        + name = \"us-sanjose-1\"\n      },\n    + {\n        + key  = \"SYD\"\n        + name = \"ap-sydney-1\"\n      },\n    + {\n        + key  = \"VCP\"\n        + name = \"sa-vinhedo-1\"\n      },\n    + {\n        + key  = \"YNY\"\n        + name = \"ap-chuncheon-1\"\n      },\n    + {\n        + key  = \"YUL\"\n        + name = \"ca-montreal-1\"\n      },\n    + {\n        + key  = \"YYZ\"\n        + name = \"ca-toronto-1\"\n      },\n    + {\n        + key  = \"ZRH\"\n        + name = \"eu-zurich-1\"\n      },\n  ]\n\nYou can apply this plan to save these new output values to the Terraform\nstate, without changing any real infrastructure.\n```\n\n[github-badge]: https://github.com/timoa/terraform-module-oci-example/workflows/Terraform/badge.svg\n[github-url]: https://github.com/timoa/terraform-module-oci-example/actions?query=workflow%3ATerraform\n[release-badge]: https://img.shields.io/github/release/timoa/terraform-module-oci-example.svg\n[release-url]: https://github.com/timoa/terraform-module-oci-example/releases/latest\n[license-badge]: https://img.shields.io/github/license/timoa/terraform-module-oci-example.svg\n[license-url]: https://github.com/timoa/terraform-module-oci-example/blob/main/LICENSE\n[pre-commit-url]: https://pre-commit.com/\n[semantic-release-url]: https://semantic-release.gitbook.io/semantic-release/\n[reviewdog-url]: https://github.com/reviewdog/reviewdog\n[renovate-url]: https://www.whitesourcesoftware.com/free-developer-tools/renovate/\n[shiftleft-scan-url]: https://shiftleft.io/docs/scan/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoa%2Fterraform-oci-module-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoa%2Fterraform-oci-module-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoa%2Fterraform-oci-module-example/lists"}